fix: apply reasoning effort to launch-time model overrides#437
Merged
Conversation
A per-task model override only received a reasoning effort when it happened to match the deployment's configured coding or code-review model, so launcher and API model picks ran with no reasoning configured at all. Stamp payload.reasoningEffort at launch for override models (inheriting the deployment coding level, falling back to the coding default, and skipping models whose catalog metadata reports no reasoning support), and consume it in the worker with precedence over the role-configured levels. This also wires up the long-documented payload.reasoningEffort field accepted by the public launch API, which nothing consumed before.
The shared launch validator still rejected any reasoning effort, returning a 400 from the public launch API and Slack !eval --reasoning before the payload stamping and worker plumbing were reached. Accept it now that the worker applies payload.reasoningEffort, and cover the API path with tests asserting the effort reaches the task payload.
Contributor
Author
|
Addressed the P2: |
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.
Problem
A launch-time model override (the model picker in the task launcher, or
harnessModelOverridesfrom the API) only received a reasoning effort when it happened to equal the deployment's configured coding model or code-review model. Any other pick ran with no reasoning configured at all — quietly different behavior from the same model configured as a role default, and the reason the #433 bug never surfaced when spot-checking models from the launcher.Separately, the task payload's
reasoningEffortfield — documented as "per-task override for the model reasoning effort used at runtime" and accepted by the public launch API — was never consumed by workers.Fix
Control plane (
resolveEffectiveHarnessModelState): when a launch selects an opencode-server model override and no explicit per-task effort is set, stamppayload.reasoningEffort— inheriting the deployment's coding-role level (env or persisted), falling back to the coding default (medium), and skipping models whose catalog metadata reportssupportsReasoning: false(unknown support keeps the default, matching the runtime-env resolution). Deployment-default launches are not stamped, so their behavior is unchanged. Explicit per-task efforts (public API) always win.Worker: plumb
payload.reasoningEffortthrough the harness (create-harness→startOpenCodeServerHarness→generateOpenCodeConfig) and apply it to the effective coding model with precedence over the role-configured levels.Side benefits: the public API's
reasoningEffortfield now actually works, and the task info panel (which already renderspayload.reasoningEffort) now shows the effort for override launches.Validation
supportsReasoning: falseskip, no stamp on deployment-default launches, snapshot-resume reuse, worker plumbing end to end (generateOpenCodeConfigemits reasoning options for the override model), and the create-harness passthrough.@roomote/cloud-agents(482) andworker(1374) suites pass;pnpm lint+pnpm check-typesclean.