[OAI] Allow forcing Responses API for non-gpt-5 model names#190
Open
Kenny Wong (wong-codaio) wants to merge 3 commits into
Open
[OAI] Allow forcing Responses API for non-gpt-5 model names#190Kenny Wong (wong-codaio) wants to merge 3 commits into
Kenny Wong (wong-codaio) wants to merge 3 commits into
Conversation
Proxy/internal setups can serve a GPT-5 model under a name that doesn't start with "gpt-5", so the name-based isGPT5Model() check alone can't route them to the Responses API. Add a per-call use_responses_api / useResponsesApi flag (camelCase at the scorer layer, snake_case in CachedLLMParams) so callers can force it; the flag is stripped before the request is sent.
SpecFileClassifier.__new__ has a fixed kwarg list, so Factuality(use_responses_api=True) and the other named scorers raised TypeError. Forward the flag like the other model knobs.
The Responses API rejects a top-level reasoning_effort param ("moved to
reasoning.effort"), so reasoning calls routed to it 400'd. Nest it correctly
in both languages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[OAI] Allow forcing Responses API for non-gpt-5 model names
use_responses_api(py) /useResponsesApi(js) flag forces the Responses API. routing becomesisGPT5Model(model) || useResponsesApi; flag is stripped before the request.gpt-5. the name check then sends it to Chat Completions and it fails, with no way to override. this flag lets such a model work regardless of its name.model, liketemperature/maxTokens.reasoning_effortwas sent top-level (the API wantsreasoning.effort), so any reasoning call routed to Responses 400'd.PTAL:
FYI:
Test plan
test.pytest.mjs