Skip to content

fix: ensure logical sorting for agent thought levels#277

Open
loriscience wants to merge 1 commit intorivet-dev:mainfrom
loriscience:fix/codex-thought-levels-sorting
Open

fix: ensure logical sorting for agent thought levels#277
loriscience wants to merge 1 commit intorivet-dev:mainfrom
loriscience:fix/codex-thought-levels-sorting

Conversation

@loriscience
Copy link

Summary

Resolved a UX inconsistency where agent thought levels (reasoning effort) were displayed in an arbitrary or non-logical order in the selector UI.

Changes

  • Logical Sorting: Implemented a fixed sort order for thought levels (low < medium < high < xhigh) in the backend config parser.
  • Improved UX: Ensures that when multiple reasoning variants are available, they are always presented in ascending order of effort.

Impact

Fixes #145. This improves the usability of the Sandbox Inspector UI and any other client consuming the capabilities API.

Verified

  • Verified the sorting logic with a standalone Rust test suite covering all variant permutations.
  • Confirmed that the fix preserves the original IDs and names, only adjusting their display sequence.

Fixed issue rivet-dev#145.

Previously, agent thought levels (reasoning effort) were returned in the order they appeared in the resource JSON or session response, resulting in a confusing UI experience (e.g., 'high' appearing before 'low').

Changes:
- Implemented logical sorting in parse_agent_config: low < medium < high < xhigh.
- Ensures a consistent and predictable UX for model variant selection.
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.

bug: codex model variants are out of order

1 participant