continue icon indicating copy to clipboard operation
continue copied to clipboard

Claude 3 Opus uses incorrect endpoint url

Open shorn-gnosis opened this issue 1 year ago • 4 comments

Before submitting your bug report

Relevant environment info

- OS: MacOS
- Continue: latest
- IDE: VSCode

Description

When adding anthropic claude 3 opus model, and setting the baseurl in the config, Continue always appends /completions which results in an incorrect base URL.

The correct base URL for Opus should be: "apiBase": "https://api.anthropic.com/v1/messages", not /completions.

See ref docs here: https://docs.anthropic.com/claude/reference/messages_post

To reproduce

  1. add anthropic claude 3 opus as llm model
  2. send user input
  3. see attached screengrabs:

Screenshot 2024-03-06 at 10 15 24 Screenshot 2024-03-06 at 10 10 05

Log output

No response

shorn-gnosis avatar Mar 06 '24 09:03 shorn-gnosis

I'm having the same issue, even thought the new /v1/messages/ endpoint for Claude 3 looks supported in core/llm/llms/Anthropic.ts lines 19 and 43:

https://github.com/continuedev/continue/blob/1192f8c9adc67c45350e3e82717ee5be9561d748/core/llm/llms/Anthropic.ts#L43

brianevanmiller avatar Mar 07 '24 21:03 brianevanmiller

I switched to v0.9.80 Pre-Release and I'm getting this: image

using

{
  "model": "claude-3-opus-20240229",
  "title": "claude-3-opus-20240229",
  "apiKey": "xxx",
  "completionOptions": {},
  "provider": "anthropic"
}

mathiasleroy avatar Mar 08 '24 13:03 mathiasleroy

@mathiasleroy I think the empty messages error may be due to an error earlier in the session. It will likely be resolved by starting a new session with cmd/ctrl+L and then trying again, but I also published a fix for that exact bug in the latest pre-release so it should work either way. Please let me know if you still run into this! If not I'll soon close the issue

sestinj avatar Mar 20 '24 23:03 sestinj

@sestinj my issue resolved itself a few days later, claude all good now. (gpt4vision not working anymore)

mathiasleroy avatar Mar 21 '24 08:03 mathiasleroy

@mathiasleroy I'm closing this since Opus sounds resolved, but if you want please open another issue with the details of gpt-v-vision and we'll gladly help out

sestinj avatar Jul 03 '24 22:07 sestinj