Skip to content

Groq: assistant messages rejected with 'reasoning_content' / 'provider_specific_fields' is unsupported (1.14.x) #762

Done

Description

@cucchetti

Problem

Thanks for the quick fix in #760 (prompt_cache_key). With that gone, the first request to Groq now succeeds, but the second request of a conversation is rejected because assistant messages in the history still carry extra properties that Groq's strict validator does not accept.

Tested on Windows, Python 3.13, uvx --from cecli-dev==1.14.0 and ==1.14.3.post9, model groq/openai/gpt-oss-120b.

Errors seen

Default (agent/tools) mode, 1.14.0, after the first tool call (ReadFile):

{"error":{"message":"'messages.2' : for 'role:assistant' the following must be satisfied[('messages.2' : property 'provider_specific_fields' is unsupported)]","type":"invalid_request_error"}}

With --edit-format diff, 1.14.3.post9, on the second request:

API Error: {"error":{"message":"'messages.2' : for 'role:assistant' the following must be satisfied[('messages.2' : property 'reasoning_content' is unsupported)]

In both cases it retries about 13 times (0.2s up to 24s) and then gives up without editing the file. In 1.10.1 to 1.12.0 the same reasoning_content error happened on every request.

Cause (my guess)

Groq's chat completions endpoint rejects unknown properties on messages. The assistant messages that cecli sends back keep reasoning_content and/or provider_specific_fields (the fields litellm adds when a reasoning model answers).

Suggestion

Either of these would fix it:

  1. A Groq provider adapter that strips reasoning_content and provider_specific_fields from assistant messages before sending, in the same place the other provider adapters clean the payload.
  2. A general option to omit those fields for strict OpenAI-compatible endpoints.

It would also help to treat this kind of invalid_request_error (HTTP 400, "property ... is unsupported") as non-retryable, since retrying 13 times with the same payload cannot succeed.

Reproduce

cecli --model groq/openai/gpt-oss-120b --no-git --yes-always --edit-format diff --no-stream --no-auto-lint --message "add a comment on the first line of file.py" file.py

with GROQ_API_KEY set and a file.py containing print("hola").

Activity

  1. dwash96 commented on Nov 28, 2026

    @dwash96
    Collaborator

    Ah dang, I'll get a 1.14.4 out today on this. Just made a groq account for myself to hammer away at what their API actually accepts for agent loops. I've explained it before in comments in the past but "openai compatible" is definitely a lie providers tell when what the mean is "approximately the v1/completions api message list shape". Like, prompt_cache_key from the original ticket is a part of real OpenAI's actual live schema to help them route requests to specific servers for KV caching and a "strict" API should actually support it but, alas!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions