fix(transports/codex): remove unsupported include parameter for standard OpenAI Chat Completions API#23460
Open
liuhao1024 wants to merge 3 commits into
Open
Conversation
…INSTALL_TIMEOUT Increase the default npm install timeout for WhatsApp bridge from 60s to 300s (5 minutes) to accommodate slower systems like Unraid NAS. Make it configurable via WHATSAPP_NPM_INSTALL_TIMEOUT environment variable for users who need even longer timeouts. Closes NousResearch#14980
- Add 'path', 'old_string', 'new_string', and 'patch' to required list - Update description to clarify mode-specific parameter requirements - This addresses issue where LLMs would omit these parameters because they were not marked as required in the schema, even though they are required depending on the mode Fixes NousResearch#15524
…ard OpenAI Chat Completions API OpenAI's standard Chat Completions API does not support the `include` parameter with `reasoning.encrypted_content`, causing HTTP 400 errors when Hermes sends it. This parameter should only be sent to: - xAI backend (already gated per model in NousResearch#23106) - GitHub Responses API (handles it separately) General backends like standard OpenAI Chat Completions API can receive the `reasoning` parameter but should NOT receive the `include` parameter. Fixes NousResearch#23450. - Remove `kwargs["include"] = ["reasoning.encrypted_content"]` for general backends - Add comment explaining backend-specific include parameter support - Add regression tests for all backend types (OpenAI, xAI, GitHub) - All 28 existing and new tests pass
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.
What does this PR do?
: OpenAI Chat Completions API does not support the
includeparameter, causing HTTP 400 errors when Hermes sendsinclude: [reasoning.encrypted_content]to the standard Chat Completions endpoint.Root Cause
In
agent/transports/codex.py, thebuild_kwargs()method unconditionally sets:for general backends (non-xAI, non-GitHub Responses) when reasoning is enabled. This is incorrect for:
api.openai.com/v1) - does NOT support theincludeparameterThe
includeparameter withreasoning.encrypted_contentis only valid for:Related Issue
Fixes #23450
Type of Change
Changes Made
How to Test
pytest tests/ -q— all tests should passChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture and workflows — or N/A