Skip to content

fix(agent): clamp aux Ultra effort for Codex and xAI Responses - #78533

Open
BillyNour wants to merge 1 commit into
NousResearch:mainfrom
BillyNour:fix/aux-xai-ultra-effort-clamp
Open

fix(agent): clamp aux Ultra effort for Codex and xAI Responses#78533
BillyNour wants to merge 1 commit into
NousResearch:mainfrom
BillyNour:fix/aux-xai-ultra-effort-clamp

Conversation

@BillyNour

Copy link
Copy Markdown

Summary

  • Clamp Hermes Ultra (and sibling above-high labels) on the auxiliary Codex/Responses adapter so side-LLM calls match each backend's accepted effort ceiling.
  • GPT-5.6 Codex path: ultramax.
  • xAI Responses path: ultra / xhigh / maxhigh.
  • Stamp current_issuer_kind when building aux Responses input so foreign encrypted reasoning is dropped (same intent as main Codex transport).
  • Tests cover GPT-5.6 ultra→max, xAI ultra/xhigh/max→high, and foreign encrypted-reasoning drop.

Why

Hermes product label Ultra is not a universal wire value. Aux calls that forwarded it raw could 400 or mis-route on Codex/xAI Responses. Main agent transport already clamps; aux did not fully match.

Test plan

  • scripts/run_tests.sh tests/agent/test_auxiliary_client.py -q → 174 passed on exact head
  • Independent leaf review on exact SHA (see PR comment / local evidence)

Scope

Only:

  • agent/auxiliary_client.py
  • tests/agent/test_auxiliary_client.py

No Honcho / installer changes.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint provider/openai OpenAI / Codex Responses API provider/xai xAI (Grok) labels Aug 4, 2026
Map Hermes Ultra (and sibling above-high labels) to each Responses
backend's accepted ceiling on the auxiliary Codex adapter path, and stamp
current_issuer_kind so foreign encrypted reasoning is not replayed.
@BillyNour
BillyNour force-pushed the fix/aux-xai-ultra-effort-clamp branch from f43f9f8 to 9d5a2fb Compare August 9, 2026 08:58
@BillyNour

Copy link
Copy Markdown
Author

Rebase onto current main

Pre: f43f9f89955aNew: 9d5a2fbbaecf
No review comments were open. Clean rebase only (2 files unchanged in scope).

@teknium1 still available for first review when convenient.

@teknium1

Copy link
Copy Markdown
Contributor

Update on the effort-clamp half: the reasoning-effort translation was centralized on main (PR #90350 — canonical ladder + declared per-route vocabularies in agent/reasoning_effort.py, with per-model Codex vocabularies following in #90441), and the auxiliary client's Responses path now clamps through the shared policy including a per-model ceiling. That covers this PR's effort-clamp intent; the xAI ceiling for the aux path is a one-line vocabulary pick if the aux client ever targets xAI Responses directly.

The OTHER half of this PR — the issuer-kind stamps for replayed encrypted reasoning in _chat_messages_to_responses_input — is NOT covered by main and still looks valuable. Recommend rebasing this PR down to just that half so it can be reviewed on its own merits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have provider/openai OpenAI / Codex Responses API provider/xai xAI (Grok) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants