Repository navigation
capture: let a deployment decide thinking for Responses requests - #1784
Merged
burtenshaw merged 2 commits intoDec 1, 2026
Merged
Conversation
The Responses dialect turns enable_thinking on for any request with a
reasoning object. Hermes sends one whatever it is configured with, so a model
run in non-thinking mode thought anyway, doubling tokens and time per rollout.
Even reasoning: {"enabled": false} turned thinking on.
enabled: false now leaves thinking off, like effort: "none".
OPENENV_CAPTURE_RESPONSES_THINKING=on|off sets it for every Responses request;
unset, the request decides as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
The docs for this pull request are available at https://openenv.github.io/OpenEnv/pr-preview/pr-1784/ (commit a10fb02). The preview may take a minute to update and is removed when the pull request closes. |
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.
Summary
The Responses dialect sets
enable_thinking: Truefor any request that carries areasoningobject, overriding the engine's default. Some agents (Hermes) send one whatever they are configured with, so there was no way to run them in non-thinking mode. Evenreasoning: {"enabled": false}turned thinking on. This PR:enabled: falselikeeffort: "none";OPENENV_CAPTURE_RESPONSES_THINKING=on|off, which decides for every Responses request.Type of Change
What happened without it
Hermes with a hybrid-thinking model served in non-thinking mode (vLLM
--default-chat-template-kwargs '{"enable_thinking": false}'): every call came back with thinking, which doubled tokens and wall time per rollout.Changes
openai_responses.py:_reasoning_config_enables_thinkingreturns False forenabled: false._thinking_override()readsOPENENV_CAPTURE_RESPONSES_THINKING:onoroffsetenable_thinkingon every Responses request, with or withoutreasoning. Unset or empty, the request decides, as now.docs/source/environments/harbor.mdandenvs/harbor_env/README.md.Test Plan
tests/envs/test_capture_responses_thinking.py(11 cases): the request-driven mapping includingenabled: false, and the override both ways, with and withoutreasoning.177 passed.
ruff format --check,ruff checkandusort checkare clean. This PR and the turn-merge PR (Responses dialect) apply together without conflicts.Used in production as a runtime patch for Hermes evals and GRPO training.
RFC Status
🤖 Generated with Claude Code
Note
Medium Risk
Changes how model thinking is enabled for Codex/Responses agents and can alter token counts and sampling behavior in training rollouts if misconfigured.
Overview
Fixes Responses dialect mapping so
reasoningwithenabled: false(and existingeffort: "none") no longer forcesenable_thinkingon the upstream chat request—agents that always send areasoningobject could previously turn thinking on even when the engine was configured for non-thinking rollouts.Adds
OPENENV_CAPTURE_RESPONSES_THINKING(on/offon the capture proxy) to setchat_template_kwargs.enable_thinkingfor every Responses request, overriding per-requestreasoningwhen unset behavior is insufficient. Harbor docs note the env var under the wire-dialects section. New tests intest_capture_responses_thinking.pycover default request-driven mapping and the deployment override.Reviewed by Cursor Bugbot for commit a10fb02. Bugbot is set up for automated code reviews on this repo. Configure here.