Skip to content

fix(auxiliary): OMIT temperature for gpt-5.5 family (#51083) - #51157

Open
Tranquil-Flow wants to merge 1 commit into
NousResearch:mainfrom
Tranquil-Flow:fix/51083-vision-temp-gpt55
Open

fix(auxiliary): OMIT temperature for gpt-5.5 family (#51083)#51157
Tranquil-Flow wants to merge 1 commit into
NousResearch:mainfrom
Tranquil-Flow:fix/51083-vision-temp-gpt55

Conversation

@Tranquil-Flow

Copy link
Copy Markdown
Contributor

What was fixed

tools/vision_tools.py defaults vision_temperature=0.1 and passes it through async_call_llm_build_call_kwargs for every model. OpenAI's gpt-5.5 family (across openai-api direct, openai-codex OAuth, openrouter, and any custom OpenAI-compatible proxy serving gpt-5.5) only accepts the provider's default temperature=1 and 400s on any other value:

Unsupported value: 'temperature' does not support 0.1 with this model. Only the default (1) value is supported.

The existing reactive retry path in agent/auxiliary_client.py (~line 5423) catches the 400 and retries without temperature, but it costs a wasted round-trip AND the issue's debug log shows the fallback chain timed out on the way — the user sees Error analyzing image: Error code: 400 - ....

Fix: add _is_gpt55_family() (provider-agnostic, prefix-greedy with -/. boundary so gpt-5.55 / gpt-5.50 / gpt-55 don't false-positive) and consult it from _fixed_temperature_for_model so _build_call_kwargs strips the temperature key entirely. The first call is then correct and the reactive retry path is no longer exercised on the gpt-5.5 family.

Sibling gpt-5.4 / gpt-5 / gpt-5-mini / gpt-4o / claude models keep custom temperature — verified by regression tests.

Every auxiliary task that uses _build_call_kwargs (vision, compression, titles, session_search, etc.) is fixed at the same point instead of per-call-site, per AGENTS.md "sibling call paths included — not just the one site the reporter hit."

How verified

  • 60/60 tests pass in tests/agent/test_gpt55_temperature_omit.py + tests/agent/test_unsupported_temperature_retry.py (post-rebase on latest upstream/main)
  • RED-phase proof: on upstream/main the new tests fail as expected:
    • test_gpt55_temperature_omit.py collection fails: ImportError: cannot import name '_is_gpt55_family' from 'agent.auxiliary_client'
    • test_gpt55_family_does_not_trigger_reactive_retry fails: directive does not strip temperature, so 2 calls are made instead of 1.
  • Production-path test: test_build_call_kwargs_strips_temperature_for_gpt55() calls the real _build_call_kwargs(provider="openai-api", model="gpt-5.5", temperature=0.1, ...) and asserts "temperature" not in kwargs.
  • Sibling-model tests: gpt-5.4, gpt-4o retain their custom temperature (assert kwargs.get("temperature") == 0.7).

Test results

tests/agent/test_gpt55_temperature_omit.py — 34 tests:

  • Family detection parametrized: matches gpt-5.5, gpt-5.5-pro, gpt-5.5-2026-04-23, gpt-5.5-codex-mini, openai/gpt-5.5, openai/gpt-5.5-pro, GPT-5.5, gpt-5.5 , openai/GPT-5.5-Pro
  • Family detection rejects: None, "", gpt-5.4, gpt-5, gpt-5-mini, gpt-5.4-mini, gpt-5.55, gpt-5.50, gpt-55, claude-sonnet-4.6, kimi-k2, trinity-large-thinking, gpt-4o
  • Directive returns OMIT_TEMPERATURE for gpt-5.5 family across all base_url variants (openai-api / codex OAuth)
  • _build_call_kwargs strips temperature for openai-api/gpt-5.5, openrouter/openai/gpt-5.5-pro, openai-codex/gpt-5.5
  • _build_call_kwargs preserves temperature for gpt-5.4 and gpt-4o

tests/agent/test_unsupported_temperature_retry.py — 26 tests (reactive retry tests moved from gpt-5.5gpt-5.4 so the genuine reactive path stays exercised; new test_gpt55_family_does_not_trigger_reactive_retry asserts exactly one call for gpt-5.5):

========= 60 passed =========

tests/agent/test_auxiliary_client.py::TestCodexAuxiliaryAdapterTimeout::test_enforces_total_timeout_while_stream_keeps_emitting_events fails on this branch (and on upstream/main independently) with a wallclock race (0.18s actual vs 0.14s threshold). It's a pre-existing flaky timing test unrelated to this fix — confirmed by running it on upstream/main without the fix applied.

Competitor analysis

Re-checked at publish time:

  • gh pr list --repo NousResearch/hermes-agent --author Tranquil-Flow --state open --search "51083 in:title,body" → empty
  • gh pr list --repo NousResearch/hermes-agent --state open --search "51083 in:title,body" → empty
  • Keyword searches for gpt-5.5 temperature, OMIT temperature, vision_analyze gpt-5.5 → no PRs referencing [Bug]: auxiliary vision sends unsupported temperature to OpenAI gpt-5.5 #51083.

No competing PR for #51083.


Auto-published by Moonsong via Path B automated pipeline (GPT-5.5 review, 2026-06-23).

Resolves #51083

@Tranquil-Flow
Tranquil-Flow force-pushed the fix/51083-vision-temp-gpt55 branch from 3052c19 to b25195a Compare June 23, 2026 02:43
@alt-glitch alt-glitch added type/bug Something isn't working comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists provider/openai OpenAI / Codex Responses API tool/vision Vision analysis and image generation labels Jun 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

1|> This was generated by AI during triage.
2|
3|This is the fix PR for #51083 (auxiliary vision sends unsupported temperature to OpenAI gpt-5.5). It pre-emptively omits temperature for the gpt-5.5 family in _fixed_temperature_for_model, so the first call is correct and the reactive 400-retry path is no longer exercised. Note: the PR also adds a root-level LAYERS.md analysis artifact that should probably be dropped before merge.

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation-only change: adds LAYERS.md explaining the auxiliary vision gpt-5.5 temperature issue (#51083). Provides a clear root-cause analysis and edge case documentation for future fix work.


Reviewed by Hermes Agent

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for isolating the pre-retry path. The premise remains present on current main: tools/vision_tools.py:1229 supplies temperature=0.1, while agent/auxiliary_client.py:399-404 has no GPT-5.5 directive and agent/auxiliary_client.py:6216-6232 includes that temperature in the request. The current async fallback only removes it after the initial failure (agent/auxiliary_client.py:7170-7179).

Problems

  • LAYERS.md:1 is a repository-root analysis artifact duplicating the issue/PR rationale; the maintainer comment on this PR already calls out that it should be dropped.

Suggested changes

  • Remove LAYERS.md and preserve the focused code and regression-test changes.

Automated hermes-sweeper review.

Comment thread LAYERS.md Outdated
@@ -0,0 +1,73 @@
# Layers from issue #51083

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop this root-level analysis artifact. It duplicates the issue/PR rationale rather than documenting a maintained product or developer surface, and the maintainer comment on this PR already identified it as merge noise.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 15, 2026
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 P2 Medium — degraded but workaround exists provider/openai OpenAI / Codex Responses API sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades tool/vision Vision analysis and image generation type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: auxiliary vision sends unsupported temperature to OpenAI gpt-5.5

4 participants