Skip to content

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

Closed as not planned

Description

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

Activity

  1. added
    type/bugSomething isn't working
    comp/agentCore agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint
    P1High — major feature broken, no workaround
    on May 10, 2026
  2. alt-glitch commented on May 10, 2026

    @alt-glitch

    Related to #23106 / #23088 — same class of bug where Hermes sends include: [reasoning.encrypted_content] to providers that don't support it. #23106 gates this for xAI models specifically; this issue reports the same problem on OpenAI's standard Chat Completions endpoint via custom provider. Fix likely needs to be extended to gate the include parameter for non-Responses-API endpoints.

  3. alex-pathcourse commented on May 11, 2026

    @alex-pathcourse

    Your Hermes agent fails because it sends an unsupported include parameter to OpenAI's API. PathCourse Health's framework adapter handles provider-specific compatibility so you don't have to maintain custom request shaping.

    Working example: https://github.com/pathcourse-health/pch-integration-examples#framework-adapters

  4. jmjeong commented on May 21, 2026

    @jmjeong

    I hit the same error from a fallback-specific path rather than the primary model path:

    HTTP 400: Encrypted content is not supported with this model
    

    Repro shape:

    # primary
    provider: openai-codex
    model: gpt-5.5
    api_mode: codex_responses
    
    # fallback
    fallback_providers:
      - provider: custom
        model: gpt-4.1-mini
        base_url: https://api.openai.com/v1
        api_key_env: OPENAI_API_KEY
        api_mode: chat_completions

    When the Codex primary hits a transient rate limit and fallback activates, the fallback activation path re-inf​ers api_mode from the direct OpenAI base URL and forces codex_responses, ignoring the explicit fallback_providers[*].api_mode. That makes the chat-only fallback receive Responses/Codex-only encrypted reasoning/include metadata and fail with this issue's error.

    I opened a draft PR with a regression test for this fallback case: #29749

    The PR keeps existing heuristics when no fallback api_mode is configured, but honors an explicit fallback override before those heuristics run.

  5. teknium1 commented on Jun 19, 2026

    @teknium1
    Collaborator

    Closing as cannot reproduce / premise no longer holds.

    The include/reasoning.encrypted_content field is only set in the Responses-API transport (agent/transports/codex.py:227-248). gpt-4o/gpt-4o-mini do not use the Responses API (_model_requires_responses_api returns True only for gpt-5*), so they never receive 'include'. Premise is provably false.

    If this is wrong and you can reproduce it on current main, please reopen with a concrete repro and the exact code path you're seeing.

  6. luff-mitchell commented on Jun 24, 2026

    @luff-mitchell

    I'm experiencing the exact same issue.
    Environment:

    Provider: openai-api (custom, OpenAI endpoint)
    Model: gpt-4o-mini
    Base URL: https://api.openai.com/v1

    Error:
    HTTP 400: Encrypted content is not supported with this model.
    {'message': 'Encrypted content is not supported with this model.', 'type': 'invalid_request_error', 'param': 'include', 'code': None}
    This matches the original report exactly — Hermes appends the include parameter (reasoning.encrypted_content) regardless of whether the target model/endpoint supports it.
    Workaround that worked for me: switching the provider away from the OpenAI endpoint to a different one (OpenRouter/Groq). Once the provider was no longer openai-api, the include parameter issue no longer triggered the 400 error. None of the config-level workarounds already mentioned in this thread (reasoning_effort: null, disabling compression/encryption, extra_body: {include: []}) had any effect for me either — switching providers was the only thing that resolved it.
    This suggests the root cause is specific to how Hermes builds requests for the openai-api provider type rather than something fixable via user config. Hope this helps narrow down the fix for #23734 / #23460.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High — major feature broken, no workaroundcomp/agentCore agent runtime: loop, agent_init, prompt builder, context-compression, responses endpointprovider/openaiOpenAI / Codex Responses APItype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions