Skip to content

fix(transports): set temperature and parallel_tool_calls for custom chat_completions#18489

Open
wpengpeng168 wants to merge 1 commit into
NousResearch:mainfrom
wpengpeng168:fix/custom-chat-completions-temp-tools-18470
Open

fix(transports): set temperature and parallel_tool_calls for custom chat_completions#18489
wpengpeng168 wants to merge 1 commit into
NousResearch:mainfrom
wpengpeng168:fix/custom-chat-completions-temp-tools-18470

Conversation

@wpengpeng168

Copy link
Copy Markdown
Contributor

Summary

Hermes forwards provider == "custom" through the Chat Completions transport. Those stacks often default omitted temperature to 1.0 and omit parallel_tool_calls, which forces sequential tool rounds even when the server supports parallel tool calls.

Fill in a conservative sampling default when Hermes supplies neither omit_temperature nor fixed_temperature, and mirror the Codex transport default by allowing parallel tool batches when tools are present.

Changes

  • agent/transports/chat_completions.py: custom-provider temperature default + parallel tool calls when tools exist.
  • tests/agent/transports/test_chat_completions.py: regression coverage.

Verification

pytest tests/agent/transports/test_chat_completions.py -q -o addopts=

…hat_completions

Apply a conservative default sampling temperature when the transport runs in is_custom_provider mode with no fixed_temperature, matching local OpenAI stacks that implicitly use 1.0.

When tools are present on the same route, default parallel_tool_calls so multi-tool turns can batch.

Add regression tests for custom-provider kwargs.

Fixes NousResearch#18470.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent loop, run_agent.py, prompt builder labels May 1, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #18483 — same root cause in chat_completions transport for custom providers. See also #18492 which fixes the same issue with broader scope.

@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #18483

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

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants