Skip to content

fix(catalog): preserve nested reasoning efforts - #1300

Closed
dbc-hbin wants to merge 1 commit into
lidge-jun:devfrom
dbc-hbin:codex/fix-nested-reasoning-efforts
Closed

fix(catalog): preserve nested reasoning efforts#1300
dbc-hbin wants to merge 1 commit into
lidge-jun:devfrom
dbc-hbin:codex/fix-nested-reasoning-efforts

Conversation

@dbc-hbin

@dbc-hbin dbc-hbin commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve reasoning_parameters.efforts emitted by OpenAI-compatible /models endpoints.
  • This fixes effort controls disappearing in downstream client exports such as Oh My Pi even when the upstream explicitly advertises a valid per-model ladder.

Verification

  • bun test tests/provider-model-discovery-contract.test.ts
  • bun run typecheck
  • bun run test
  • bun run privacy:scan
  • Live synthetic-provider verification: the advertised low, high, and max values now appear in omp models.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed (not needed for an internal metadata parser fix).
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults; no credentials are stored or emitted.
  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • New Features

    • Model discovery now recognizes and preserves available reasoning-effort options from compatible catalogs.
  • Bug Fixes

    • Improved handling of nested model metadata so reasoning capabilities are accurately surfaced.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Model catalog metadata

Layer / File(s) Summary
Nested reasoning effort extraction and validation
src/codex/catalog/provider-fetch.ts, tests/provider-model-discovery-contract.test.ts
At lines 926–935, catalogHintsFromModelsApiItem reads reasoning_parameters.efforts after existing sources. At lines 277–283, a contract test verifies that nested effort metadata is preserved as reasoningEfforts.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: lidge-jun, olddonkey

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: preserving nested reasoning effort options during catalog parsing.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Aug 8, 2026
@lidge-jun

Copy link
Copy Markdown
Owner

Approved the pending Cross-platform CI run at this exact head, and it came back green.

Worth explaining the silence beforehand: contributor PRs queue their workflow runs as action_required until a maintainer releases them, and gh pr checks does not show that state — so from your side it looks like nothing is happening rather than like something is waiting on us. That was ours to clear, not yours.

To be precise about what this does and does not do: it only unblocks CI. It does not make this mergeable. The four-box readiness checklist in the description is your attestation, and the gate keeps the PR in draft until you complete it. With CI now green at your head, box 1 is provable.

If anything in the run looks wrong to you, say so and I will dig into it rather than leaving you to guess.

@dbc-hbin
dbc-hbin force-pushed the codex/fix-nested-reasoning-efforts branch from b9c0371 to b78932f Compare August 9, 2026 03:24
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed; the review readiness checklist is complete.

Review readiness checklist

  • ✅ All CI tests are green on my local testing.
  • ✅ I pushed my PR to the latest dev commit.
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ✅ My PR is ready for review.

4/4 boxes ticked.

This pull request is already Ready for Review.
The review-ready label marks this PR as ready; review automation runs independently. If no CodeRabbit review appears, comment @coderabbitai review to request one.
Maintainers: @lidge-jun @Ingwannu @Wibias

@github-actions
github-actions Bot marked this pull request as ready for review August 9, 2026 03:26

@Ingwannu Ingwannu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation is small and directionally correct, and I verified the exact submitted head locally: typecheck passed and tests/provider-model-discovery-contract.test.ts passed 27/27.\n\nI am not approving or merging this head yet because the required GitHub CI is not green. Test shard 3/4 was cancelled only after hitting the 15-minute job limit; the annotations show Bun hanging in unrelated suites, not an assertion caused by this parser change. The branch is also now 31 commits behind current dev after other merges.\n\nPlease rebase this one-commit change onto current dev and rerun exact-head CI. If the required checks are green on that head, this remains a good merge candidate.

@lidge-jun

Copy link
Copy Markdown
Owner

Landed on dev as 87aeeb7, rebased onto the current head with your authorship preserved.

Verified before merge: src/codex/catalog/provider-fetch.ts:926 only read capabilities.reasoning_effort ?? item.reasoning_efforts, so a model exposing its ladder as reasoning_parameters.efforts lost it entirely. Routing the new fallback through the existing normalizedStringList/sanitizeCodexReasoningEfforts path keeps the bounds and sanitization intact rather than adding a second validation route. Full suite green on the rebased head (10175 pass, 0 fail).

Thanks.

@lidge-jun lidge-jun closed this Aug 9, 2026

dbc-hbin commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for landing this with authorship preserved and for the detailed verification. I confirmed 87aeeb7f0 is now contained in dev; no further action is needed from this branch.

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

Labels

bug Something isn't working review-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants