hermes - ✅(Solved) Fix [Bug]: [Bug]: Hermes v0.13.0 sends unsupported `include` parameter causing "Encrypted content is not supported with this model" error with OpenAI GPT-4o [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#23450Fetched 2026-05-11 03:29:28
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2cross-referenced ×2

Hermes sends an unsupported include parameter with reasoning.encrypted_content to OpenAI API, causing all requests to fail with HTTP 400 error.

Error Message

Hermes sends an unsupported include parameter with reasoning.encrypted_content to OpenAI API, causing all requests to fail with HTTP 400 error. 5. Request fails with encrypted content error

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fix / Workaround

## Workarounds Attempted
- ✗ Changed `reasoning_effort` to `null`
- ✗ Disabled `compression`
- ✗ Disabled `encryption`
- ✗ Added `extra_body: {include: []}`
- ✗ Multiple reinstalls and config resets

PR fix notes

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

Description (problem / solution / changelog)

Summary

Fixes #23450: 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:

  • xAI backend (already gated per model in #23106)
  • GitHub Responses API (handles it separately)

Fix

  • Removed kwargs["include"] = ["reasoning.encrypted_content"] for general backends
  • Added explanatory comment about backend-specific include parameter support
  • The reasoning parameter is still sent to general backends (OpenAI supports it)
  • The elif not is_github_responses and not is_xai_responses: kwargs["include"] = [] line remains for when reasoning is disabled

Regression Coverage

Added TestCodexIncludeParameterGating class with 4 tests:

  • test_openai_chat_completions_no_include_when_enabled - verifies standard OpenAI API does NOT receive include parameter (but does receive reasoning)
  • test_xai_include_with_reasoning_enabled - verifies xAI backend still receives include parameter (preserving #23106 behavior)
  • test_github_responses_no_include_without_extra - verifies GitHub Responses does NOT receive include without github_reasoning_extra
  • test_github_responses_reasoning_without_include - verifies GitHub Responses can use reasoning but not include

All 28 tests in test_codex_transport.py pass.

Related Issues

  • #23450: This fix
  • #23106: xAI reasoning.effort gating (same class of bug, different backend)
  • #23088: Original xAI bug report

Test Plan

  • python -m pytest tests/agent/transports/test_codex_transport.py -v — 28 passed
  • Verified xAI tests still pass (preserving #23106 behavior)
  • Verified GitHub Responses tests still pass
  • Manual verification: standard OpenAI Chat Completions API no longer receives include parameter

Changed files

  • agent/transports/codex.py (modified, +2/-1)
  • gateway/platforms/whatsapp.py (modified, +4/-1)
  • tests/agent/transports/test_codex_transport.py (modified, +70/-0)
  • tests/tools/test_file_tools.py (modified, +37/-0)
  • tools/file_tools.py (modified, +6/-6)

Code Example

model:
  default: gpt-4o
  provider: custom
  base_url: https://api.openai.com/v1
  api_key_env: OPENAI_API_KEY

agent:
  reasoning_effort: null

compression:
  enabled: false

encryption:
  enabled: false

---

## Workarounds Attempted
-Changed `reasoning_effort` to `null`
-Disabled `compression`
-Disabled `encryption`
-Added `extra_body: {include: []}`
-Multiple reinstalls and config resets

OpenAI API reference confirms `encrypted_content` is only supported via Responses API for specific models/use cases, not for standard Chat Completions with GPT-4o.

---

Similar issues reported in other projects:
- pydantic/pydantic-ai#3326
- pydantic/pydantic-ai#2865
- RooCodeInc/Roo-Code#9225
RAW_BUFFERClick to expand / collapse

Bug Description

Environment

  • OpenAI SDK: 2.36.0
  • Provider: custom (OpenAI API)
  • Model: gpt-4o, gpt-4o-mini (both affected)

Description

Hermes sends an unsupported include parameter with reasoning.encrypted_content to OpenAI API, causing all requests to fail with HTTP 400 error.

Configuration

model:
  default: gpt-4o
  provider: custom
  base_url: https://api.openai.com/v1
  api_key_env: OPENAI_API_KEY

agent:
  reasoning_effort: null

compression:
  enabled: false

encryption:
  enabled: false

Steps to Reproduce

  1. Fresh install Hermes v0.13.0
  2. Configure custom provider with OpenAI endpoint
  3. Set model to gpt-4o or gpt-4o-mini
  4. Run hermes and send any prompt
  5. Request fails with encrypted content error

Expected Behavior

Hermes should send standard OpenAI API requests without include parameter for models that don't support encrypted content.

Actual Behavior

Hermes automatically adds include parameter to requests, causing all interactions to fail.

Affected Component

Configuration (config.yaml, .env, hermes setup)

Messaging Platform (if gateway-related)

No response

Debug Report

## Workarounds Attempted
- ✗ Changed `reasoning_effort` to `null`
- ✗ Disabled `compression`
- ✗ Disabled `encryption`
- ✗ Added `extra_body: {include: []}`
- ✗ Multiple reinstalls and config resets

OpenAI API reference confirms `encrypted_content` is only supported via Responses API for specific models/use cases, not for standard Chat Completions with GPT-4o.

Operating System

macOS Taho

Python Version

3.11.15

Hermes Version

v0.13.0 (2026.5.7)

Additional Logs / Traceback (optional)

Similar issues reported in other projects:
- pydantic/pydantic-ai#3326
- pydantic/pydantic-ai#2865
- RooCodeInc/Roo-Code#9225

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

Add model capability check before including reasoning.encrypted_content parameter in API requests. Only append include parameter when model explicitly supports it (e.g., o1/o3 series via Responses API). For standard models like GPT-4o using Chat Completions endpoint, omit the parameter entirely.

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Bug]: [Bug]: Hermes v0.13.0 sends unsupported `include` parameter causing "Encrypted content is not supported with this model" error with OpenAI GPT-4o [1 pull requests, 2 comments, 3 participants]