Skip to content

fix(providers): fall back to Responses API for compatible endpoints - #430

Open
aniketshukla1 wants to merge 1 commit into
andrewyng:mainfrom
aniketshukla1:fix/openai-responses-fallback
Open

fix(providers): fall back to Responses API for compatible endpoints#430
aniketshukla1 wants to merge 1 commit into
andrewyng:mainfrom
aniketshukla1:fix/openai-responses-fallback

Conversation

@aniketshukla1

Copy link
Copy Markdown

Summary

  • Keep custom endpoints on Chat Completions by default and switch only after an endpoint explicitly rejects a tool-enabled request and directs it to /v1/responses.
  • Reuse the existing OpenAI SDK client and cache a working Responses protocol per model.
  • Preserve Responses tool-call IDs and avoid retrying a stream after Chat Completions output has started.

Fixes #85

Validation

  • .venv/bin/pytest -q (1116 passed, 1 skipped)
  • git diff --check

Screenshots

Not applicable: this is provider protocol routing and regression coverage with no UI change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAI custom endpoint requiring /v1/responses fails on GPT-5.6 tool calls

1 participant