Skip to content

[Bug]: Intermittent Error with Litellm - Message: Malformed API Key passed in. Ensure Key has Bearer prefix. #57863

Description

@SuperMckee

Bug Description

I am finding that Litellm is receiving partial requests from Hermes which is then causing an error and the request seems to get stuck on the hermes side also.

Steps to Reproduce

This just occurs with normal use within hermes with either the desktop client or the dashboard usage.

Expected Behavior

Requests should not be malformed.

Actual Behavior

Getting intermittent errors in LiteLLM

Request Failed
Message: Malformed API Key passed in. Ensure Key has Bearer prefix.

Affected Component

Agent Core (conversation loop, context compression, memory)

Messaging Platform (if gateway-related)

No response

Debug Report

Report       https://paste.rs/0Nw2l
  agent.log    https://paste.rs/rIrXt
  gateway.log  https://paste.rs/32Q8u
  gui.log      https://paste.rs/tZYHd

Operating System

Ubuntu 24.04

Python Version

3.12.3

Hermes Version

0.18.0

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsbugcomp/agentCore agent runtime: loop, agent_init, prompt builder, context-compression, responses endpointneeds-reproBug needs reproduction stepstype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions