Skip to content

Commit 14fbf0b

Browse files
committed
fix: add openai-compatible case to UI hook
1 parent a417819 commit 14fbf0b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

webview-ui/src/components/ui/hooks/useSelectedModel.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,18 @@ function getSelectedModel({
367367
const info = routerModels["vercel-ai-gateway"]?.[id]
368368
return { id, info }
369369
}
370+
case "openai-compatible": {
371+
// OpenAI Compatible provider uses custom configuration
372+
const id = apiConfiguration.apiModelId ?? "default"
373+
// Basic model info for OpenAI compatible APIs
374+
const info: ModelInfo = {
375+
maxTokens: 128000,
376+
contextWindow: 128000,
377+
supportsPromptCache: false,
378+
supportsImages: false,
379+
}
380+
return { id, info }
381+
}
370382
// case "anthropic":
371383
// case "human-relay":
372384
// case "fake-ai":

0 commit comments

Comments
 (0)