Repository navigation
feat(refiner): per-role model and reasoning for refiner calls - #85
Merged
Merged
Conversation
openchia.refiner_roles in the Hermes config overrides, per refiner role, the custom provider, the model and the reasoning of calls that otherwise use the owning Duet's route. Roles are Episode local IDs (designer also covers launch) plus the call kinds emitter (module transcription) and coder (the Implementer's coding session). reasoning: default omits reasoning_effort so the server default applies (on vLLM Qwen3.8 that is xhigh, which is not accepted on the wire); none disables reasoning; a level enables it. Overrides are resolved and validated when the Duet binding is frozen, stored secret-free in the binding record (so /build continue keeps them), and each attempt receipt records refiner_role. Credentials come from the provider's key_env at call time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
Every refiner call used the owning Duet's single route. On mango (vLLM Qwen3.8-27B) the best reasoning level (
xhigh) can only be reached by omittingreasoning_effort. vLLM accepts onlylow/mediumon the wire. Measured on one hard prompt:low6.4k tokens in 140 s;mediumand default (xhigh) hit the 12k cap in about 280 s. Deep reasoning pays off for one Designer or emitter call, but it is too costly on every step of a coding loop. Operators also want to send coding work to a different model, such as Qwen3-Coder-Next.What
openchia.refiner_rolesin the Hermes config:custom_provider(a name fromcustom_providers),model, andreasoning, which takesdefault,none, or a level.designeralso coverslaunch.emitter(set by arole_scopecontext var inemit_modules) andcoder(viaDuetEpisodeBinding.for_role)./build. They are stored in the binding record without secrets, so/build continuekeeps them, and the recovery policy is recomputed for each route. Keys are read at call time from the provider'skey_env.refiner_role./code(agent/workflow_coding.py) is unchanged.Tests
tests/agent/test_refiner_role_routes.py(11 tests) covers:for_role;refiner_rolein the receipts;defaultreasoning leavingreasoning_effortout of the request.origin/main(6 failed, 30 errors intests/iterative_episode_refiner/*). The errors all come from the assignment-v1 contract fixtures and are not caused by this change. Ruff is clean.🤖 Generated with Claude Code