Repository navigation
Conversation
enable_thinking reached only NRP models listed in thinking_models and was dropped for OpenRouter ids. Add a thinking_dialect provider setting (openrouter -> top-level reasoning object), accept an OpenAI-style reasoning_effort level, translate both per backend in reasoning_payload(), and log reasoning_effort on the request record.
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
enable_thinkingonly reaches NRP models listed inthinking_models(aschat_template_kwargs). For OpenRouter ids the proxy drops it with an info log, so an app cannot turn reasoning down on an OpenRouter model.This shows up in global-30x30. In session
b9f2c027(2026-10-16), MiMo V2.6 Flash took 188 s on the step afterfit_sdm, producing 4,985 completion tokens. 4,759 of those were reasoning, before a singleadd_hex_tile_layercall. Other steps in the same session spent 1,059 of 1,258 and 1,058 of 1,321 tokens reasoning.Change
thinking_dialect;config.jsonsets"openrouter"on the OpenRouter provider. For a model not inthinking_models, the proxy then sends OpenRouter's top-levelreasoningobject.reasoning_effort(none/minimal/low/medium/high, OpenAI-style). If both fields are sent, the level wins. This gives clients a level to expose, as harnesses usually do; the boolean alone can't express one.reasoning_payload()does the per-backend mapping:thinking_modelsmodelenable_thinking: false{key: false}reasoning: {enabled: false}enable_thinking: true{key: true}reasoning: {enabled: true}reasoning_effort: "none"{key: false}reasoning: {enabled: false}reasoning_effort: "low"etc.{key: true}(logged: no levels)reasoning: {effort: "low"}reasoning_effortis logged on the request record next toenable_thinking.python test_logging.pypasses the 45 tests before its__main__block, including the three new ones.Not verified yet
I could not probe OpenRouter directly; the key lives only in the cluster secret. After deploy, check the effect on MiMo Flash by sending the same request with
"enable_thinking": falseand with"reasoning_effort": "low", and comparingtokens.completion_tokens_details.reasoning_tokensin the response log. For models whose reasoning is mandatory, OpenRouter may still reason. Following thethinking_modelsprecedent (#105), any model that ignores the setting should be recorded once probed.Follow-ups
reasoning_effortdefaults in config, sending the new field. To be filed as a separate geo-agent issue.