mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-27 08:14:33 +08:00
fix(opencode): use OpenAI-compatible SDK for APINebula preset
APINebula is an OpenAI-compatible relay (its base URL ends in /v1, matching its Codex/OpenClaw/Hermes presets), but the OpenCode preset loaded the @ai-sdk/openai package, which targets the OpenAI Responses API and fails against chat-completions-only upstreams. Switch the npm field to @ai-sdk/openai-compatible so requests use the OpenAI Chat Completions format.
This commit is contained in:
@@ -1250,7 +1250,7 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
websiteUrl: "https://apinebula.com",
|
||||
apiKeyUrl: "https://apinebula.com/02rw5X",
|
||||
settingsConfig: {
|
||||
npm: "@ai-sdk/openai",
|
||||
npm: "@ai-sdk/openai-compatible",
|
||||
name: "APINebula",
|
||||
options: {
|
||||
baseURL: "https://apinebula.com/v1",
|
||||
|
||||
Reference in New Issue
Block a user