支持 OpenAI Chat 兼容协议 (#99)

* feat: 完成 openai 接口兼容

* feat: 完成 openai 协议兼容

* fix: 修复测试用例
This commit is contained in:
claude-code-best
2026-04-03 23:33:17 +08:00
committed by GitHub
parent 465e9f01c6
commit 00b044e8b2
22 changed files with 2283 additions and 18 deletions

View File

@@ -372,6 +372,13 @@ export const SettingsSchema = lazySchema(() =>
permissions: PermissionsSchema()
.optional()
.describe('Tool usage permissions configuration'),
modelType: z
.enum(['anthropic', 'openai'])
.optional()
.describe(
'API provider type. "anthropic" uses the Anthropic API (default), "openai" uses the OpenAI Chat Completions API (/v1/chat/completions). ' +
'When set to "openai", configure OPENAI_API_KEY, OPENAI_BASE_URL, and OPENAI_MODEL in env.',
),
model: z
.string()
.optional()