[Feature]: 加固 Provider / Gateway 兼容性与外部 API 接入 / Harden provider-gateway compatibility and external API integration
Problem / pain point / 问题
Open CoDesign 已经支持多 provider、自定义 OpenAI-compatible endpoint、keyless provider、以及外部配置导入,但 API 兼容性仍然偏“隐式”:
- 不同 gateway 只实现了部分 OpenAI-compatible 接口
- 有些 endpoint 有
/models,有些没有
- 有些支持
responses,有些只支持 chat/completions
system / developer role 行为不一致
- reasoning 支持依赖 provider 和 model
- 外部配置导入正在增多,但每个来源仍然有独立逻辑
Open CoDesign already supports multiple providers, custom OpenAI-compatible endpoints, keyless providers, and external config import. The remaining pain is compatibility hardening:
- different gateways partially implement OpenAI-compatible APIs
- some endpoints expose
/models, some do not
- some providers support
responses, others only chat/completions
- role handling differs across gateways
- reasoning support depends on provider/model
- external imports are growing, but each source still has bespoke logic
Proposed solution / 方案
把 provider compatibility 当成一等产品能力,而不只是零散补丁。
Treat provider compatibility as a first-class product surface rather than a collection of one-off fixes.
本 epic 追踪以下工作:
- provider capability profile
- capability-aware diagnostics
- connection-test and runtime parity
- LiteLLM first-class preset
- formal model discovery modes
- explicit wire / role / reasoning policy
- unified external-provider adapter framework
- OpenCode / Codex / CCS-style import follow-up
- actionable provider error normalization
Alternatives considered / 备选方案
-
继续按案例追加兼容补丁
-
为每个 provider 单独做一套 bespoke integration
- 缺点:会绕开现有
wire + baseUrl + headers + model 抽象
-
Keep shipping incremental compatibility patches
- Rejected because it scales poorly
-
Build bespoke integration paths for every provider
- Rejected because it fights the existing abstraction
Scope / 范围
Provider / model
Hard-constraints check / 约束检查
Child issues / 子 issue
Suggested order / 建议顺序
- Capability profile
- Diagnostics and capability detection
- Connection-test and runtime parity
- Model discovery modes
- LiteLLM gateway preset
- Wire-role-reasoning policy
- External provider adapter framework
- OpenCode-Codex-CCS follow-up
- Error normalization and recovery hints
Current code references / 现有代码参考
packages/providers/src/index.ts
packages/providers/src/errors.ts
packages/providers/src/gateway-compat.ts
apps/desktop/src/main/provider-settings.ts
apps/desktop/src/main/resolve-api-key.ts
apps/desktop/src/main/connection-ipc.ts
apps/desktop/src/main/imports/opencode-config.ts
apps/desktop/src/main/onboarding-ipc.ts
[Feature]: 加固 Provider / Gateway 兼容性与外部 API 接入 / Harden provider-gateway compatibility and external API integration
Problem / pain point / 问题
Open CoDesign 已经支持多 provider、自定义 OpenAI-compatible endpoint、keyless provider、以及外部配置导入,但 API 兼容性仍然偏“隐式”:
/models,有些没有responses,有些只支持chat/completionssystem/developerrole 行为不一致Open CoDesign already supports multiple providers, custom OpenAI-compatible endpoints, keyless providers, and external config import. The remaining pain is compatibility hardening:
/models, some do notresponses, others onlychat/completionsProposed solution / 方案
把 provider compatibility 当成一等产品能力,而不只是零散补丁。
Treat provider compatibility as a first-class product surface rather than a collection of one-off fixes.
本 epic 追踪以下工作:
Alternatives considered / 备选方案
继续按案例追加兼容补丁
为每个 provider 单独做一套 bespoke integration
wire + baseUrl + headers + model抽象Keep shipping incremental compatibility patches
Build bespoke integration paths for every provider
Scope / 范围
Provider / model
Hard-constraints check / 约束检查
CLAUDE.mdand this proposal does not conflict with them.Child issues / 子 issue
Suggested order / 建议顺序
Current code references / 现有代码参考
packages/providers/src/index.tspackages/providers/src/errors.tspackages/providers/src/gateway-compat.tsapps/desktop/src/main/provider-settings.tsapps/desktop/src/main/resolve-api-key.tsapps/desktop/src/main/connection-ipc.tsapps/desktop/src/main/imports/opencode-config.tsapps/desktop/src/main/onboarding-ipc.ts