mirror of
https://github.com/Finesssee/ProxyPilot.git
synced 2026-11-18 18:04:20 +00:00
3.9 KiB
3.9 KiB
Compatibility Matrix (Quick Reference)
This project proxies multiple “OpenAI-compatible” clients to multiple upstreams. Small schema differences matter.
Clients
Codex CLI (codex_cli_rs/...)
- Endpoint:
POST /v1/responses - Streaming: SSE (
text/event-stream) - Notes:
data: [DONE]sentinel is tolerated/expected by many Codex/OpenAI clients.- Response output ordering and
output_textfields must be stable. - Routing transparency:
- Responses from localhost include:
X-ProxyPilot-Requested-ModelX-ProxyPilot-Resolved-ModelX-ProxyPilot-Provider-CandidatesX-ProxyPilot-Resolved-Provider
- Add
X-CLIProxyAPI-Debug-Auth: 1(localhost only) to also receive:X-CLIProxyAPI-Selected-Provider,X-CLIProxyAPI-Selected-Auth,X-CLIProxyAPI-Selected-Label,X-CLIProxyAPI-Selected-Account.
- Responses from localhost include:
Droid / Factory CLI (factory-cli/..., Stainless headers)
- Endpoint:
POST /v1/responses - Streaming behavior:
- Sends
stream: truebut typically usesAccept: application/json - CLIProxyAPI uses a non-stream upstream call and synthesizes SSE for reliability.
- Sends
- Notes:
- Droid attempts to JSON-parse each SSE
data:line, sodata: [DONE]must not be emitted for this client. - Routing transparency:
- For localhost requests, the same headers as Codex apply for underlying routing.
- The
/v0/management/routing/preview?model=...endpoint is the easiest way to debug which provider amodelwill map to before sending a turn from Droid/Factory.
- Droid attempts to JSON-parse each SSE
OpenAI-compatible SDKs (openai, azure-openai, etc.)
- Endpoints:
POST /v1/chat/completions,POST /v1/completions. - Streaming behavior:
- If body has
"stream": trueandAcceptincludestext/event-stream, ProxyPilot streams SSE. - If
Accept: application/jsonwithouttext/event-stream, ProxyPilot automatically downgrades to non-streaming and returns JSON, even whenstream: true.
- If body has
- Notes:
- Responses from localhost include routing headers as above.
- For debugging, you can issue a test request and inspect:
X-ProxyPilot-Requested-ModelvsX-ProxyPilot-Resolved-Modelto see alias/auto/thinking normalisation.X-ProxyPilot-Provider-CandidatesandX-ProxyPilot-Resolved-Providerto see which upstream(s) and which provider actually ran.
Upstreams
Antigravity (cloudcode-pa.googleapis.com)
- Endpoints:
v1internal:generateContent(non-stream)v1internal:streamGenerateContent?alt=sse(stream)
- Notes:
request.contents[].parts[].textmust be a string ("text":"..."), not an object.
Model routing rules
- Quick debugging helpers:
GET /v0/management/routing/preview?model=<name>- Returns JSON describing how a given model name will be normalised and which provider candidates will be used.
POST /v0/management/routing/preview- Accepts a full request JSON body (OpenAI/OpenAIResponses-compatible), extracts the
modelfield, and returns the same routing preview for that model.
- Accepts a full request JSON body (OpenAI/OpenAIResponses-compatible), extracts the
/v0/management/routing/recent- Returns a small in-memory list of the last few routed requests (timestamp, path, requested/resolved model, provider + candidates).
- Both endpoints require a management key and are intended for localhost use.
gemini-3-* provider preference
- Primary:
antigravity - Fallback:
gemini-cli(only used if antigravity is unavailable/cooling) - Rotation: disabled between these two providers to keep the primary stable.
Regression tests
- Droid SSE parsing:
sdk/api/handlers/openai/openai_responses_handlers_sse_done_test.go - Codex SSE done sentinel:
sdk/api/handlers/openai/openai_responses_handlers_sse_json_compat_test.go - Antigravity request shape:
internal/runtime/executor/antigravity_executor_shape_test.go - Gemini-3-* provider ordering:
internal/util/provider_test.goandsdk/cliproxy/auth/provider_rotation_test.go