Repository navigation
[Feature]: Adaptive reasoning effort policy for mixed-capability combos and tool-bearing requests #2731
Description
What are you trying to accomplish?
I need an OpenAI-compatible combo that mixes models with different reasoning-effort capabilities to expose a usable shared effort picker without sending an incompatible effort parameter to targets that cannot accept it.
Concretely, a combo should be able to include:
- a model that accepts reasoning effort both with and without tools;
- a model that accepts reasoning effort on plain text requests, but must omit the effort parameter when the request includes tools;
- a model that intentionally exposes no effort control.
What prevents this today?
Two capability shapes cannot currently be represented together:
- The Chat Completions bridge can declare per-model supported efforts, but it does not support the request-level compatibility rule "omit effort only when tools are present".
- Combo catalog derivation intersects every known target ladder. An explicitly empty ladder means "no effort control" and participates in that intersection, so one no-effort target can make the whole combo picker empty even when other targets support the same four rungs.
Keeping the provider-wide ladder empty avoids upstream errors, but it also hides reasoning controls for models that genuinely support them.
What should OpenCodex do?
Add a per-model compatibility flag for OpenAI Chat providers so a model can expose supported efforts while omitting the wire effort field when the request includes tools.
Add an opt-in combo reasoning effort mode with these semantics:
- default
strictkeeps the current intersection behavior unchanged; adaptivederives the public combo ladder from targets that expose non-empty effort control;- targets with an explicit empty ladder remain supported as no-effort-control targets;
- per-concrete-target request conversion preserves the selected effort only for targets that support it, and omits it for targets that intentionally expose no effort control;
- the new per-model tools-compatibility flag omits the wire effort field whenever tools are present;
- combo target order and failover behavior remain unchanged.
Example usage or interface
Provider configuration:
{
"providers": {
"custom-openai-chat": {
"type": "openai-chat",
"modelReasoningEfforts": {
"model-a": ["low", "medium", "high", "xhigh"],
"model-b": ["low", "medium", "high", "xhigh"]
},
"omitReasoningEffortWithToolsModels": ["model-b"]
}
}
}Expected request behavior:
model-a + tools + reasoning effort high
-> send reasoning_effort=high
model-b + no tools + reasoning effort high
-> send reasoning_effort=high
model-b + tools + reasoning effort high
-> omit reasoning_effort and let the upstream model default apply
Combo configuration:
{
"combos": {
"mixed": {
"targets": [
{ "provider": "custom-openai-chat", "model": "model-a" },
{ "provider": "custom-openai-chat", "model": "model-b" },
{ "provider": "no-effort-provider", "model": "model-c" }
],
"defaultEffort": "medium",
"reasoningEffortMode": "adaptive"
}
}
}Expected catalog behavior:
strict -> current all-known-target intersection (unchanged)
adaptive -> [low, medium, high, xhigh] from non-empty target ladders
Expected adaptive failover behavior:
model-a target -> selected effort is sent
model-b target without tools -> selected effort is sent
model-b target with tools -> selected effort is omitted
model-c no-effort target -> selected effort is omitted
Alternatives or workarounds
Current workarounds are either too weak or unsafe:
- Set an empty provider-wide ladder. This prevents upstream errors, but hides effort controls for models that support them and makes the combo picker empty.
- Advertise a full ladder for every model. This makes tool-bearing requests to incompatible models fail deterministically instead of adapting.
- Manually route around incompatible models. This loses ordered combo failover.
- Retry the deterministic 400. Retrying cannot repair an invalid tools + effort parameter combination; the request must be constructed differently.
Additional context
This is related to, but narrower than, previous routed-effort propagation issues:
- [Bug] Reasoning effort selected in Codex Desktop is not propagated to routed DeepSeek and GLM models #1100 covered selected efforts not propagating to routed DeepSeek/GLM models.
- Feature request: per-model option to stop advertising synthetic
max/ultrareasoning rungs on models that don't support them #1870 covered hiding synthetic unsupported max/ultra rungs. - [Bug]: Kimi client integration never emits capabilities/support_efforts — routed models (incl. combos) show as 'thinking unsupported' #2688 covered routed models not advertising support_efforts.
This proposal covers a different gap: per-model effort compatibility that depends on whether tools are present, plus an opt-in combo policy for mixed-capability targets.
No secrets or personal data are included. Provider names and model IDs above are synthetic examples. The compatibility evidence should be covered by deterministic local request-construction tests rather than by logging raw upstream traffic.
Activity
lidge-jun commentedon Aug 27, 2026
리뷰 · 우선순위 58 / 80
이 이슈가 말하는 문제는 두 겹입니다. 첫째, openai-chat 브리지는 모델마다 지원 effort 목록은 적을 수 있지만, "도구가 있을 때만 effort를 빼라"는 요청 단위 규칙을 표현할 수 없습니다. 둘째, 콤보 카탈로그는 알려진 타깃 사다리를 모두 교집합하는데, 의도적으로 빈 사다리(노력 조절 없음)도 그 교집합에 들어가서, 한 타깃만 노력 없음이어도 콤보 피커 전체가 비어 버립니다. 지금
dev(HEAD06fa6801d)의deriveComboCatalogModel과 openai-chat 어댑터를 보면 그 설명이 맞습니다. 빈 provider-wide 사다리로 올리면 업스트림 400은 막히지만, 노력 조절이 되는 형제 모델의 UI도 같이 사라집니다.이슈 본문 - 필요한 설정 이름(
omitReasoningEffortWithToolsModels,reasoningEffortMode: adaptive)과 기대 요청/카탈로그 표가 구체적입니다. 재현·대안도 짧고 명확합니다.관련 이슈 - #1100 / #1870 / #2688과 겹치지 않고, "도구 유무에 따른 호환 + 혼합 능력 콤보"라는 더 좁은 구멍을 가리킵니다.
구현 PR - 같은 작성자의 draft #2734가 이 이슈를
Closes #2731로 이미 구현 중입니다. 문서·스키마·어댑터·카탈로그·관리 API·테스트가 들어 있습니다.메인테이너의 판단이 필요한 지점
strict로 두고 adaptive만 켜게 한 설계는 호환에 안전합니다. 이 방향을 공식으로 받아들일지 확인만 하면 됩니다.너의 추천
이슈는 열어 두고, draft #2734 체크리스트가 끝난 뒤 그 PR을 머지해 닫으세요. 지금 이슈만 따로 닫거나 라벨을 바꾸지 마세요. #2734가 막히면 그때 다시 설계를 쪼개면 됩니다.
이 댓글은 grok-bot이 작성했습니다
test(combo): cover adaptive effort mode and the tool-bearing opt-out
feat(combo): adapt reasoning effort to target capabilities
test(combo): cover adaptive effort mode and the tool-bearing opt-out
feat(combo): adapt reasoning effort to target capabilities (#2731) (#…
lidge-jun commentedon Sep 1, 2026
Landed on origin/dev as 88c4275 via #3190. GitHub does not auto-close issues from a non-default target.
github-actions commentedon Sep 1, 2026
Automated translation bookkeeping — detected language: English.
feat(combo): adapt reasoning effort to target capabilities (lidge-jun…
feat(combo): adapt reasoning effort to target capabilities (lidge-jun…