Repository navigation
feat(models): map thinkingBudget to reasoning_effort for OpenAI reasoning models - #201
Merged
Merged
Conversation
…ning models Signed-off-by: Ym <173550318+MaxonT@users.noreply.github.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Codra Review
✅ Nothing to flag. Reviewed 3 files (122 changed lines) and found no issues worth raising.
Reviewed commit: d0efd2ca8e
ℹ️ About Codra in GitHub
Your team has set up Codra to review pull requests in this repo. Reviews are triggered when you:
- Open a pull request for review
- Mark a draft as ready
Every review posts a summary here. A clean pass also gets a 👍 on the pull request itself.
devarshishimpi
approved these changes
Nov 29, 2026
devarshishimpi
left a comment
Owner
There was a problem hiding this comment.
LGTM! Thanks for contributing.. !
devarshishimpi
added a commit
that referenced
this pull request
Nov 29, 2026
- core(review): deduplicate diff cache helper, cache empty diffs via != null, validate commit SHAs, and add PR-context JSDoc note (#181 / PR #203) - api/node/worker: bypass Hyperdrive SQL caching via SELECT clock_timestamp(), fail fast on disconnected Redis via PING_REDIS, coalesce in-flight probes, suppress late rejections, preserve logger requestId on health probe warnings, and add adapter wiring tests + K8s timeoutSeconds docs (#173 / PR #202) - models/schema: guard non-finite/negative thinkingBudget, exclude o1-mini/o1-preview from reasoning_effort, simplify Zod schema, and consolidate OpenAI tests with real schema parsing (#177 / PR #201)
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.
Description
Hello, I traced this one down and the change is short.
Adds
reasoning_effortto the OpenAI adapter request for reasoning models (isReasoning), taken from the model profile'sthinkingBudget. A numeric budget above 10000 sendshigh, above 3000medium, anything elselow;low,mediumandhighare passed through.off,autoand no budget leave the parameter out, and non-reasoning models are unchanged. The profile schema only acceptedoff,autoor an integer, so I addedlow,mediumandhighto it so the string pass-through from the issue is reachable. No profile inmodel-profiles.jsonis for an OpenAI reasoning model today (grepped foro3,o4andgpt-6), so no shipped request changes until such a profile sets a budget.Fixes #177
Thanks for writing the sub-issue with the exact mapping and a Done When list; it made the scope easy to check.
Not verified: no request was sent to a real OpenAI endpoint. The adapter is also used for other OpenAI-compatible endpoints, so a server that rejects unknown fields and serves a model named like
o3could return an error when a numeric budget is set.Type of change
How Has This Been Tested?
test/openai-reasoning-effort.spec.ts(6 tests) covers the 3000/10000 boundaries, string pass-through, off/auto/absent budget, a standard model (gpt-4o), and the request body sent foro3-mini,o4-mini,o3andgpt-6. It passes with the change; with the line that setsreasoning_effortremoved, 2 of the 6 fail.npm run lint: clean.npm run typecheck: 22 errors, the same 22 as on the base commit (worker and test files, none in the touched files).npx vitest run(whole suite): 84 failed, 465 passed. The same 20 files fail on the base commit without my change; I did not inspect each failure; the suite has Postgres-dependent tests and I had no Postgres running. I did not runnpm testagainst a database or the integration suite.Checklist: