Skip to content

feat(reasoning): add max effort level - #1253

Open
GTanger wants to merge 3 commits into
moltis-org:mainfrom
GTanger:feat/max-reasoning-effort
Open

feat(reasoning): add max effort level#1253
GTanger wants to merge 3 commits into
moltis-org:mainfrom
GTanger:feat/max-reasoning-effort

Conversation

@GTanger

@GTanger GTanger commented Sep 2, 2026

Copy link
Copy Markdown

Summary

  • add max to the shared ReasoningEffort schema and @reasoning-max model suffix parsing
  • forward max unchanged through the OpenAI Codex Responses API while clamping providers that do not expose a distinct maximum level
  • expose Max in the reasoning selector, translations, and browser coverage
  • document all accepted reasoning-effort values in the configuration reference and generated template

Validation

  • cargo test -p moltis-config reasoning_effort (3 passed)
  • cargo test -p moltis-config write_default_config_writes_template_to_requested_path (passed)
  • cargo test -p moltis-providers reasoning_effort (9 passed)
  • targeted suffix parsing and OpenAI Codex wire-value tests passed
  • npm run typecheck
  • Biome checks on all changed UI and E2E files
  • reasoning-toggle.spec.js (7 passed in Chromium)
  • cargo build --bin moltis
  • scripts/check-changelog-guard.sh origin/main HEAD

Manual QA

A local Moltis build was exercised through the web UI with openai-codex::gpt-5.6-sol@reasoning-max. The request reached the provider as reasoning.effort = "max" and completed successfully.

The full AI-assisted session is not attached because it contains private local authentication, deployment details, and unrelated workspace context. This PR includes the relevant implementation decisions and redacted validation results.

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a shared maximum reasoning-effort level and carries it from configuration and model suffix parsing through provider-specific mappings and the browser selector.

  • Parses and serializes max through the shared Rust enum and @reasoning-max model suffix.
  • Passes max through OpenAI Codex while clamping providers without a distinct maximum level.
  • Adds the Max selector option, localized labels, and targeted Rust and browser coverage.

Confidence Score: 4/5

The PR appears safe to merge, with the non-blocking requirement to document the new user-facing configuration value and expose it in the configuration template.

The enum, suffix, provider mappings, and UI flow consistently handle Max, while the remaining issue is stale configuration discovery documentation rather than a runtime defect.

Files Needing Attention: crates/config/src/schema.rs, docs/src/configuration-reference.md, crates/config/src/template.rs

Important Files Changed

Filename Overview
crates/config/src/schema.rs Adds the Max enum variant and its parsing, serialization, ordering, and display label, but the user-facing config documentation remains stale.
crates/providers/src/model_id.rs Adds complete @reasoning-max suffix parsing and raw-ID stripping coverage.
crates/providers/src/openai/provider/core.rs Maps Max according to existing provider policies, including clamping OpenAI Chat Completions to high.
crates/providers/src/openai_codex.rs Forwards Max as the literal reasoning.effort = "max" Responses API value and tests the wire representation.
crates/providers/src/anthropic.rs Clamps Max to the existing 65,536-token upper thinking budget.
crates/web/ui/src/reasoning-toggle.ts Adds Max to the selector and maps it to the new localized label.
crates/web/ui/e2e/specs/reasoning-toggle.spec.js Extends browser coverage for option rendering and the @reasoning-max chat payload.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    UI[Reasoning selector: Max] --> ID[Model ID @reasoning-max]
    Config[reasoning_effort = max] --> Effort[ReasoningEffort::Max]
    ID --> Parser[Suffix parser]
    Parser --> Effort
    Effort --> Route{Provider adapter}
    Route --> Codex[OpenAI Codex: max]
    Route --> OpenAI[OpenAI Chat: high]
    Route --> Anthropic[Anthropic: 65536 token budget]
    Route --> DeepSeek[DeepSeek: max]
    Route --> Kimi[Kimi: max]
Loading

Reviews (1): Last reviewed commit: "feat(reasoning): add max effort" | Re-trigger Greptile

Comment thread crates/config/src/schema.rs
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.

1 participant