docs: refresh provider replay family refs

This commit is contained in:
Peter Steinberger
2026-04-04 12:15:19 +01:00
parent b838ecf885
commit 62c54fdc16
3 changed files with 39 additions and 12 deletions

View File

@@ -739,15 +739,32 @@ api.registerProvider({
still runs on core OpenAI transports but owns its transport/base URL
normalization, OAuth refresh fallback policy, default transport choice,
synthetic Codex catalog rows, and ChatGPT usage endpoint integration.
- Google AI Studio and Gemini CLI OAuth use `resolveDynamicModel` and
`isModernModelRef` because they own Gemini 3.1 forward-compat fallback and
modern-model matching; Gemini CLI OAuth also uses `formatApiKey`,
`resolveUsageAuth`, and `fetchUsageSnapshot` for token formatting, token
parsing, and quota endpoint wiring.
- Google AI Studio and Gemini CLI OAuth use `resolveDynamicModel`,
`buildReplayPolicy`, `sanitizeReplayHistory`,
`resolveReasoningOutputMode`, and `isModernModelRef` because the
`google-gemini` replay family owns Gemini 3.1 forward-compat fallback,
native Gemini replay validation, bootstrap replay sanitation, tagged
reasoning-output mode, and modern-model matching; Gemini CLI OAuth also uses
`formatApiKey`, `resolveUsageAuth`, and `fetchUsageSnapshot` for token
formatting, token parsing, and quota endpoint wiring.
- Anthropic Vertex uses `buildReplayPolicy` through the
`anthropic-by-model` replay family so Claude-specific replay cleanup stays
scoped to Claude ids instead of every `anthropic-messages` transport.
- Amazon Bedrock uses `buildReplayPolicy`, `matchesContextOverflowError`,
`classifyFailoverReason`, and `resolveDefaultThinkingLevel` because it owns
Bedrock-specific replay policy plus throttle/not-ready/context-overflow
error classification for Anthropic-on-Bedrock traffic.
error classification for Anthropic-on-Bedrock traffic; its replay policy
shares the same Claude-only `anthropic-by-model` guard.
- OpenRouter, Kilocode, Opencode, and Opencode Go use `buildReplayPolicy`
through the `passthrough-gemini` replay family because they proxy Gemini
models through OpenAI-compatible transports and need Gemini
thought-signature sanitation without native Gemini replay validation or
bootstrap rewrites.
- MiniMax uses `buildReplayPolicy` through the
`hybrid-anthropic-openai` replay family because one provider owns both
Anthropic-message and OpenAI-compatible semantics; it keeps Claude-only
thinking-block dropping on the Anthropic side while overriding reasoning
output mode back to native.
- Moonshot uses `catalog` plus `wrapStreamFn` because it still uses the shared
OpenAI transport but needs provider-owned thinking payload normalization.
- Kilocode uses `catalog`, `capabilities`, `wrapStreamFn`, and

View File

@@ -79,7 +79,7 @@ subpaths is in `scripts/lib/plugin-sdk-entrypoints.json`.
| --- | --- |
| `plugin-sdk/cli-backend` | CLI backend defaults + watchdog constants |
| `plugin-sdk/provider-auth` | `createProviderApiKeyAuthMethod`, `ensureApiKeyFromOptionEnvOrPrompt`, `upsertAuthProfile` |
| `plugin-sdk/provider-model-shared` | `normalizeModelCompat`, `buildProviderReplayFamilyHooks` |
| `plugin-sdk/provider-model-shared` | `normalizeModelCompat`, `buildProviderReplayFamilyHooks`, `sanitizeGoogleGeminiReplayHistory`, `resolveTaggedReasoningOutputMode` |
| `plugin-sdk/provider-catalog-shared` | `findCatalogTemplate`, `buildSingleProviderApiKeyCatalog` |
| `plugin-sdk/provider-tools` | `buildProviderToolCompatFamilyHooks`, Gemini schema helpers |
| `plugin-sdk/provider-usage` | `fetchClaudeUsage` and similar |

View File

@@ -266,11 +266,21 @@ API key auth, and dynamic model resolution.
Available replay families today:
- `openai-compatible`
- `anthropic-by-model`
- `google-gemini`
- `passthrough-gemini`
- `hybrid-anthropic-openai`
| Family | What it wires in |
| --- | --- |
| `openai-compatible` | Shared OpenAI-style replay policy for OpenAI-compatible transports, including tool-call-id sanitation, assistant-first ordering fixes, and generic Gemini-turn validation where the transport needs it |
| `anthropic-by-model` | Claude-aware replay policy chosen by `modelId`, so Anthropic-message transports only get Claude-specific thinking-block cleanup when the resolved model is actually a Claude id |
| `google-gemini` | Native Gemini replay policy plus bootstrap replay sanitation and tagged reasoning-output mode |
| `passthrough-gemini` | Gemini thought-signature sanitation for Gemini models running through OpenAI-compatible proxy transports; does not enable native Gemini replay validation or bootstrap rewrites |
| `hybrid-anthropic-openai` | Hybrid policy for providers that mix Anthropic-message and OpenAI-compatible model surfaces in one plugin; optional Claude-only thinking-block dropping stays scoped to the Anthropic side |
Real bundled examples:
- `google` and `google-gemini-cli`: `google-gemini`
- `openrouter`, `kilocode`, `opencode`, and `opencode-go`: `passthrough-gemini`
- `anthropic-vertex`: `anthropic-by-model`
- `minimax`: `hybrid-anthropic-openai`
- `moonshot`, `ollama`, `xai`, and `zai`: `openai-compatible`
<Tabs>
<Tab title="Token exchange">