Bug] GPT-OSS-120B: Reasoning tokens and gibberish output appearing in responses despite configuration to hide reasoning

Model: GPT OSS 120B
Endpoint: (e.g., /v1/chat/completions)

SDK: 0.32
params = { “temperature”: 1.0, “max_tokens”: 512, “top_p”: 0.9, “reasoning_format”: “hidden”, “disable_tool_validation”: True, }

Frequency: 4/10 requests

Expected Behavior

  • When reasoning_format=“Hidden”

    no reasoning text should appear in the final user content.

  • The response should contain only valid, user-facing text or tool calls, never both mixed together.

Observed Behavior

  • The model generates gibberish / “thinking” text at the beginning of responses — e.g. starts with “First…” or random valid tokens.

  • Occasionally the response mixes tool calls and junk text in the same message.

  • This appears as if the model is leaking reasoning tokens, even though the configuration requests them to be hidden.

  • The issue started recently; the same setup previously behaved correctly.

Sample response :

Sure! Let’s talk… First—………… …

Got……… … ………… Sorry about that glitch

1 Like

I’m trying to reproduce the error with this, but I can’t get it to spit out gibberish; are you still seeing errors on your end?

Oh, the other thing we added is prompt caching; so if the FIRST request spits out gibberish and you try the same exact prompt again, the gibberish might be cached.

Bust the cache by adding a timestamp or random value at the beginning of the message

curl --request POST \
    --url https://api.groq.com/openai/v1/chat/completions \
    --header 'authorization: Bearer ID' \
    --header 'content-type: application/json' \
    --data '{
    "messages": [
        {
            "role": "user",
            "content": "Extract structured data from: '\''John Doe, age 30, lives in New York'\''"
        }
    ],
    "model": "openai/gpt-oss-120b",
    "temperature": 1,
    "max_completion_tokens": 8192,
    "top_p": 1,
    "stream": false,
    "stop": null,
    "reasoning_format": "hidden",
    "disable_tool_validation": true,
    "tools": [
        {
            "type": "function",
            "function": {
                "name": "get_json_from_data",
                "description": "Extract and return structured JSON data from a short string of unstructured text",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "data": {
                            "type": "string",
                            "description": "The raw text data to parse and extract information from"
                        },
                        "schema": {
                            "type": "object",
                            "description": "The expected JSON schema structure to extract",
                            "properties": {
                                "type": {
                                    "type": "string",
                                    "enum": ["object"]
                                },
                                "properties": {
                                    "type": "object",
                                    "description": "Field definitions for the extracted data"
                                },
                                "required": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    },
                                    "description": "List of required fields"
                                }
                            }
                        }
                    },
                    "required": [
                        "data",
                        "schema"
                    ]
                }
            }
        }
    ]
}'