-
Notifications
You must be signed in to change notification settings - Fork 16
fix: handle vscode-lm-proxy model ID for claude provider #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,6 +48,8 @@ export async function getVSCodeModel( | |
| selectedModelId = modelManager.getOpenAIModelId() | ||
| } else if (provider === 'anthropic') { | ||
| selectedModelId = modelManager.getAnthropicModelId() | ||
| } else if (provider === 'claude') { | ||
| selectedModelId = modelManager.getClaudeCodeBackgroundModelId() | ||
| } | ||
|
|
||
| if (!selectedModelId) { | ||
|
|
@@ -56,11 +58,17 @@ export async function getVSCodeModel( | |
| } | ||
|
|
||
| // providerが'claude'の場合は、モデルIDに含まれる文字列を元にモデルを分岐 | ||
| if (provider === 'claude') { | ||
| if (provider === 'claude' && modelId !== 'vscode-lm-proxy') { | ||
| if (modelId.includes('haiku')) { | ||
| selectedModelId = modelManager.getClaudeCodeBackgroundModelId() | ||
| const backgroundModel = modelManager.getClaudeCodeBackgroundModelId() | ||
| if (backgroundModel) { | ||
| selectedModelId = backgroundModel | ||
| } | ||
| } else if (modelId.includes('sonnet') || modelId.includes('opus')) { | ||
| selectedModelId = modelManager.getClaudeCodeThinkingModelId() | ||
| const thinkingModel = modelManager.getClaudeCodeThinkingModelId() | ||
| if (thinkingModel) { | ||
| selectedModelId = thinkingModel | ||
| } | ||
|
Comment on lines
+63
to
+71
|
||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The choice to always use Background model for
vscode-lm-proxywith Claude provider may not align with all use cases. Consider documenting why Background model is the default choice rather than Thinking model, or consider making this configurable. This is consistent with how OpenAI and Anthropic providers work (they each have a single default), but the Claude provider has two distinct model types (Background vs Thinking).