Skip to content

fix(transports/codex): remove unsupported include parameter for standard OpenAI Chat Completions API#23460

Open
liuhao1024 wants to merge 3 commits into
NousResearch:mainfrom
liuhao1024:fix/issue-23450-include-param-openai
Open

fix(transports/codex): remove unsupported include parameter for standard OpenAI Chat Completions API#23460
liuhao1024 wants to merge 3 commits into
NousResearch:mainfrom
liuhao1024:fix/issue-23450-include-param-openai

Conversation

@liuhao1024

@liuhao1024 liuhao1024 commented May 10, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

: OpenAI Chat Completions API does not support the include parameter, causing HTTP 400 errors when Hermes sends include: [reasoning.encrypted_content] to the standard Chat Completions endpoint.

Root Cause

In agent/transports/codex.py, the build_kwargs() method unconditionally sets:

kwargs["include"] = ["reasoning.encrypted_content"]

for general backends (non-xAI, non-GitHub Responses) when reasoning is enabled. This is incorrect for:

  • Standard OpenAI Chat Completions API (api.openai.com/v1) - does NOT support the include parameter
  • Other general backends that may not support encrypted content

The include parameter with reasoning.encrypted_content is only valid for:

Related Issue

Fixes #23450

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • See commit messages for detailed changes

How to Test

  1. Run pytest tests/ -q — all tests should pass
  2. Verify the specific scenario described above is resolved

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 26.4.1

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture and workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A

liuhao1024 and others added 3 commits April 24, 2026 22:14
…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
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 provider/openai OpenAI / Codex Responses API type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: [Bug]: Hermes v0.13.0 sends unsupported include parameter causing "Encrypted content is not supported with this model" error with OpenAI GPT-4o

2 participants