claude-code-hub icon indicating copy to clipboard operation
claude-code-hub copied to clipboard

转发 gpt-5.3-codex-spark 报错

Open bingniunai opened this issue 9 months ago • 1 comments

returned 400: Provider returned 400: Bad Request

bingniunai avatar Feb 13 '26 04:02 bingniunai

Thank you for reporting this issue.

Analysis:

The error message Provider returned 400: Bad Request indicates that the request for model gpt-5.3-codex-spark was successfully routed through the proxy pipeline to an upstream provider, but the upstream provider itself rejected the request with HTTP 400.

Here's how the proxy handles this:

  1. The proxy does not validate or filter model names by default — it passes the model name as-is to the upstream provider (src/app/v1/_lib/proxy/provider-selector.ts, line 157-159: if a non-Anthropic provider has no allowedModels configured, it accepts any model and delegates validation to the upstream).

  2. The upstream provider receives the request with model: "gpt-5.3-codex-spark", doesn't recognize it, and returns 400.

  3. The proxy wraps this as Provider returned 400: Bad Request (see src/app/v1/_lib/proxy/errors.ts, line 67).

Likely cause:

The upstream provider you configured does not support the model gpt-5.3-codex-spark. This is not a bug in the proxy — the proxy correctly forwarded the request and relayed the provider's error response.

Suggested steps:

  1. Verify that your upstream provider actually supports the model name gpt-5.3-codex-spark. Check the provider's API documentation for the exact model identifier.

  2. If the upstream uses a different model name, you can configure a model redirect in the provider settings. This maps the requested model name to one the upstream recognizes. The redirect logic is in src/app/v1/_lib/proxy/model-redirector.ts — for example, you could map gpt-5.3-codex-spark to the actual model name your provider expects.

  3. If you have multiple providers configured, make sure the provider that supports this model has it listed in its allowedModels (or has allowedModels empty to accept all models). See src/app/v1/_lib/proxy/provider-selector.ts, lines 114-164 for the model matching logic.

To help diagnose further, please provide:

  • [ ] Which upstream provider are you using (provider type and base URL)?
  • [ ] What endpoint are you sending the request to (/v1/chat/completions, /v1/responses, etc.)?
  • [ ] Does the upstream provider confirm support for the model gpt-5.3-codex-spark?

Automated response from Claude AI

github-actions[bot] avatar Feb 13 '26 04:02 github-actions[bot]