Skip to content

fix: preserve provider-defined reasoning levels - #38

Merged
sizzlecar merged 1 commit into
mainfrom
fix/dynamic-reasoning-capabilities
Sep 17, 2026
Merged

sizzlecar merged 1 commit into
mainfrom
fix/dynamic-reasoning-capabilities

Conversation

@sizzlecar

Copy link
Copy Markdown
Owner

Provider reasoning choices were limited by client-side enums and fallback menus, so a service adding a new effort could fail discovery or require an Orchestral release. This change preserves any nonempty provider effort, including its casing, through discovery, selection, configuration, request serialization, and request identity.

  • Generic/OpenAI menus use declared capabilities. When capabilities are unknown, the menu offers the default and explains how to submit an explicit value with /reasoning <value> or --reasoning for service validation. For example, a declared future-next is sent unchanged as reasoning_effort: "future-next".
  • Default still omits the control; none remains an explicit effort, and on/off remain thinking controls. The effort: escape preserves literal provider efforts that collide with local controls: /reasoning effort:on sends reasoning_effort: "on", without enabling the thinking switch.
  • Native Codex creation choices follow its available model catalog and explicit native defaults, preserving new effort strings. Without a catalog, optional free-text controls let Codex validate explicit values or choose omitted defaults. No fixed model/effort fallback is invented.
  • Web creation/action forms can clear optional enum fields back to omission. Required sandbox and approval controls retain their validation. The embedded Web bundle was regenerated with the official build script.

Validation completed locally:

  • cargo fmt --all -- --check and cargo check --locked --workspace --all-targets passed.
  • Complete OpenAI adapter library: 39 passed; core library: 94 passed; native Codex library: 98 passed; CLI library: 163 passed, 1 existing ignored.
  • The real PTY/local HTTP fixture passed after selecting a server-declared future-next and submitting /reasoning effort:on; it verifies the actual outgoing request, model/history retention, and existing session-resume behavior. It uses a local fixture service, not live model inference.
  • Web form tests with the web feature: 5 passed; WASM compile check and scripts/build_web.sh passed. The first official build reached successful DX compilation but could not locate the shared target output; rerunning with the local ignored target mapping succeeded, without changing the script.
  • git diff --check passed. Full workspace test/lint validation is delegated to CI; no paid-provider or GPU tests were run for this change.

Native catalog choices are a connector-initialization snapshot, and a chosen model remains responsible for validating an effort from the catalog's combined choices. Preserving a native ultra string does not claim that an OpenAI HTTP effort named ultra reproduces Codex's native preset or multi-agent behavior. This PR does not change version numbers or documentation.

@sizzlecar
sizzlecar merged commit be4a3ed into main Sep 17, 2026
12 checks passed
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