jackschedel / KoalaClient

The best LLM API Playground Interface (for me)
https://client.koaladev.io/
Creative Commons Zero v1.0 Universal
26 stars 8 forks source link

Incorrect response from "anthropic/claude-3.5-sonnet" model on OpenRouter API #126

Closed ghominejad closed 1 week ago

ghominejad commented 1 week ago

When using the OpenAI format API request with the "anthropic/claude-3.5-sonnet" and many other models via the endpoint https://openrouter.ai/api/v1/chat/completions, the response completion is not generating properly. while other Chat UIs havn't had such an issue.

To Reproduce Steps to reproduce the behavior:

  1. Make an API request to the endpoint https://openrouter.ai/api/v1/chat/completions using the OpenAI standard format.
  2. Use the model "anthropic/claude-3.5-sonnet".
  3. Example prompt:
    • System: You are Claude, a large language model trained by Anthropic. Carefully heed the user's instructions. Respond very concise.
    • User: loop from 1 to 100 in python
  4. Observe the response.

Expected behavior The response should generate a concise and correct Python loop for iterating from 1 to 100.

Actual behavior The response is incorrect and incomplete. Example response:

Here's a concise Python loop

for1, 101(i)