feat(plugins): move anthropic and openai vendors to plugins

This commit is contained in:
Peter Steinberger
2026-03-15 17:07:28 -07:00
parent e42d86afa9
commit ee7ecb2dd4
17 changed files with 530 additions and 10 deletions

View File

@@ -51,10 +51,14 @@ Typical split:
Current bundled examples:
- `anthropic`: Claude 4.6 forward-compat fallback, usage endpoint fetching,
and cache-TTL/provider-family metadata
- `openrouter`: pass-through model ids, request wrappers, provider capability
hints, and cache-TTL policy
- `github-copilot`: forward-compat model fallback, Claude-thinking transcript
hints, runtime token exchange, and usage endpoint fetching
- `openai`: GPT-5.4 forward-compat fallback, direct OpenAI transport
normalization, and provider-family metadata
- `openai-codex`: forward-compat model fallback, transport normalization, and
default transport params plus usage endpoint fetching
- `google-gemini-cli`: Gemini 3.1 forward-compat fallback plus usage-token

View File

@@ -164,6 +164,7 @@ Important trust note:
- [Nostr](/channels/nostr) — `@openclaw/nostr`
- [Zalo](/channels/zalo) — `@openclaw/zalo`
- [Microsoft Teams](/channels/msteams) — `@openclaw/msteams`
- Anthropic provider runtime — bundled as `anthropic` (enabled by default)
- BytePlus provider catalog — bundled as `byteplus` (enabled by default)
- Cloudflare AI Gateway provider catalog — bundled as `cloudflare-ai-gateway` (enabled by default)
- Google Antigravity OAuth (provider auth) — bundled as `google-antigravity-auth` (disabled by default)
@@ -178,6 +179,7 @@ Important trust note:
- Model Studio provider catalog — bundled as `modelstudio` (enabled by default)
- Moonshot provider runtime — bundled as `moonshot` (enabled by default)
- NVIDIA provider catalog — bundled as `nvidia` (enabled by default)
- OpenAI provider runtime — bundled as `openai` (enabled by default)
- OpenAI Codex provider runtime — bundled as `openai-codex` (enabled by default)
- OpenCode Go provider capabilities — bundled as `opencode-go` (enabled by default)
- OpenCode Zen provider capabilities — bundled as `opencode` (enabled by default)
@@ -348,6 +350,13 @@ api.registerProvider({
### Built-in examples
- Anthropic uses `resolveDynamicModel`, `capabilities`, `resolveUsageAuth`,
`fetchUsageSnapshot`, and `isCacheTtlEligible` because it owns Claude 4.6
forward-compat, provider-family hints, usage endpoint integration, and
prompt-cache eligibility.
- OpenAI uses `resolveDynamicModel`, `normalizeResolvedModel`, and
`capabilities` because it owns GPT-5.4 forward-compat plus the direct OpenAI
`openai-completions` -> `openai-responses` normalization.
- OpenRouter uses `catalog` plus `resolveDynamicModel` and
`prepareDynamicModel` because the provider is pass-through and may expose new
model ids before OpenClaw's static catalog updates.