Skip to content

[Bug]: Model calls to google provider return 400 error with Invalid JSON payload on thinking_config #17426

@tima-110

Description

@tima-110

Bug Description

Getting the following error following update this morning:
Non-retryable error (HTTP 400): HTTP 400: Error code: 400 - [{'error': {'code': 400, 'message': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.', 'status': 'INVALID_ARGUMENT', 'details': [{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'description': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.'}]}]}}]

Steps to Reproduce

  1. update as of 07:00 on 29 APR 2026
  2. Have Google as Provider and Gemma 4 31B IT as model
  3. Send chat from Telegram

Expected Behavior

Chat successfully sent and chat successfully returned

Actual Behavior

Exits with error message very quickly (in --tui, no error displayed, but exits immediately)

Affected Component

Agent Core (conversation loop, context compression, memory)

Messaging Platform (if gateway-related)

No response

Debug Report

--- hermes dump ---
version:          0.11.0 (2026.4.23) [58a6171b]
os:               Linux 6.17.0-20-generic x86_64
python:           3.11.15
openai_sdk:       2.30.0
profile:          default
hermes_home:      ~/.hermes
model:            gemma-4-31b-it
provider:         gemini
terminal:         local

api_keys:
  openrouter           set
  openai               set
  anthropic            not set
  anthropic_token      not set
  nous                 not set
  google/gemini        set
  gemini               not set
  glm/zai              not set
  zai                  not set
  kimi                 not set
  minimax              not set
  deepseek             not set
  dashscope            not set
  huggingface          not set
  nvidia               not set
  ai_gateway           not set
  opencode_zen         not set
  opencode_go          not set
  kilocode             not set
  firecrawl            not set
  tavily               not set
  browserbase          not set
  fal                  not set
  elevenlabs           not set
  github               not set

features:
  toolsets:           hermes-cli
  mcp_servers:        0
  memory_provider:    built-in
  gateway:            running (systemd (user), pid 2760165)
  platforms:          telegram
  cron_jobs:          1 active / 1 total
  skills:             97

config_overrides:
  agent.max_turns: 60
  display.streaming: True
--- end dump ---
2026-04-28 06:59:16,195 INFO agent.auxiliary_client: Vision auto-detect: using main provider gemini (gemma-4-31b-it)
2026-04-28 06:59:16,271 INFO agent.auxiliary_client: Auxiliary auto-detect: using main provider gemini (gemma-4-31b-it)
2026-04-28 09:00:04,687 INFO agent.auxiliary_client: Auxiliary auto-detect: using main provider gemini (gemma-4-31b-it)
2026-04-28 21:09:07,518 INFO gateway.platforms.telegram: [Telegram] Flushing text batch agent:main:telegram:group:-:2 (91 chars)
2026-04-28 21:09:07,545 INFO gateway.run: inbound message: platform=telegram user=Tim Alosi chat=-msg='Hi Pollux.   This topic is to discuss our tech stack.   Can you tell me a bit ab'
2026-04-28 21:09:08,467 INFO [20260427_072306_75ae3801] agent.auxiliary_client: Vision auto-detect: using main provider gemini (gemma-4-31b-it)
2026-04-28 21:09:10,960 INFO [20260427_072306_75ae3801] agent.auxiliary_client: Auxiliary auto-detect: using main provider gemini (gemma-4-31b-it)
2026-04-28 21:09:42,493 INFO gateway.run: response ready: platform=telegram chat=-time=34.9s api_calls=2 response=2338 chars
2026-04-28 21:09:42,538 INFO agent.auxiliary_client: Auxiliary title_generation: using auto (gemma-4-31b-it) at https://generativelanguage.googleapis.com/v1beta
2026-04-28 21:09:42,557 INFO gateway.platforms.base: [Telegram] Sending response (2338 chars) to -
2026-04-28 22:10:29,071 INFO gateway.run: Agent cache idle-TTL evict: session=agent:main:telegram:group:-:2 (idle=3647s)
2026-04-28 22:10:29,080 INFO gateway.run: Agent cache idle sweep: evicted 1 agent(s)
2026-04-29 04:00:53,437 INFO gateway.run: Session expiry: 1 sessions to finalize (telegram:1)
2026-04-29 04:00:53,445 INFO gateway.run: Session expiry done: 1 finalized
2026-04-29 06:45:17,836 INFO hermes_cli.backup: State snapshot created: 20260429-104517-pre-update (10 files)
2026-04-29 06:45:49,429 INFO gateway.run: Stopping gateway for restart...
2026-04-29 06:45:52,725 INFO telegram.ext.Application: Application is stopping. This might take a moment.
2026-04-29 06:45:52,735 INFO apscheduler.scheduler: Scheduler has been shut down
2026-04-29 06:45:52,744 INFO telegram.ext.Application: Application.stop() complete
2026-04-29 06:45:52,777 INFO gateway.platforms.telegram: [Telegram] Disconnected from Telegram
2026-04-29 06:45:52,777 INFO gateway.run: ✓ telegram disconnected
2026-04-29 06:45:52,833 INFO gateway.run: Gateway stopped
2026-04-29 06:45:52,835 INFO gateway.run: Cron ticker stopped
2026-04-29 06:46:26,779 INFO hermes_cli.plugins: Plugin 'openai' registered image_gen provider: openai
2026-04-29 06:46:26,781 INFO hermes_cli.plugins: Plugin 'openai-codex' registered image_gen provider: openai-codex
2026-04-29 06:46:26,782 INFO hermes_cli.plugins: Plugin 'xai' registered image_gen provider: xai
2026-04-29 06:46:26,834 INFO hermes_cli.plugins: Plugin discovery complete: 7 found, 4 enabled
2026-04-29 06:46:27,704 INFO gateway.run: Starting Hermes Gateway...
2026-04-29 06:46:27,704 INFO gateway.run: Session storage: /home/castor/.hermes/sessions
2026-04-29 06:46:27,706 INFO gateway.run: Previous gateway exited cleanly — skipping session suspension
2026-04-29 06:46:27,873 INFO gateway.run: Connecting to telegram...
2026-04-29 06:46:27,982 INFO gateway.platforms.telegram_network: DoH discovery yielded no new IPs (system DNS:); using seed fallback IPs 
2026-04-29 06:46:27,983 INFO gateway.platforms.telegram: [Telegram] Auto-discovered Telegram fallback IPs: 
2026-04-29 06:46:27,983 INFO gateway.platforms.telegram: [Telegram] Telegram fallback IPs active: 
2026-04-29 06:46:28,288 INFO apscheduler.scheduler: Scheduler started
2026-04-29 06:46:28,288 INFO telegram.ext.Application: Application started
2026-04-29 06:46:28,875 INFO gateway.platforms.telegram: [Telegram] Telegram menu: 100 commands registered, 27 hidden (over 100 limit). Use /commands for full list.
2026-04-29 06:46:28,876 INFO gateway.platforms.telegram: [Telegram] Connected to Telegram (polling mode)
2026-04-29 06:46:28,884 INFO gateway.run: ✓ telegram connected
2026-04-29 06:46:28,884 INFO gateway.run: Gateway running with 1 platform(s)
2026-04-29 06:46:28,888 INFO gateway.run: Channel directory built: 2 target(s)
2026-04-29 06:46:28,889 INFO gateway.run: Press Ctrl+C to stop
2026-04-29 06:46:28,922 INFO gateway.run: Cron ticker started (interval=60s)
2026-04-29 06:57:17,506 INFO hermes_cli.plugins: Plugin 'openai' registered image_gen provider: openai
2026-04-29 06:57:17,507 INFO hermes_cli.plugins: Plugin 'openai-codex' registered image_gen provider: openai-codex
2026-04-29 06:57:17,507 INFO hermes_cli.plugins: Plugin 'xai' registered image_gen provider: xai
2026-04-29 06:57:17,563 INFO hermes_cli.plugins: Plugin discovery complete: 7 found, 4 enabled
2026-04-29 06:57:18,913 INFO agent.auxiliary_client: Vision auto-detect: using main provider gemini (gemma-4-31b-it)
2026-04-29 06:57:19,172 INFO agent.auxiliary_client: Auxiliary auto-detect: using main provider gemini (gemma-4-31b-it)
2026-04-29 06:57:19,176 INFO acp_adapter.session: Created ACP session b4805a4f-ff52-4fbf-bbdb-10db69c2dab8 (cwd=/tmp/multica-hermes-discovery-2859392049)
2026-04-29 06:57:19,176 INFO acp_adapter.server: New session b4805a4f-ff52-4fbf-bbdb-10db69c2dab8 (cwd=/tmp/multica-hermes-discovery-2859392049)
2026-04-29 07:23:30,378 INFO gateway.platforms.telegram: [Telegram] Flushing text batch agent:main:telegram:group:-:2 (57 chars)
2026-04-29 07:23:30,388 INFO gateway.run: inbound message: platform=telegram user=Tim Alosi chat=-   msg='So if I have an existing skill, how can i give it to you?'
2026-04-29 07:23:30,886 INFO run_agent: Loaded environment variables from /home/castor/.hermes/.env
2026-04-29 07:23:31,654 INFO agent.auxiliary_client: Vision auto-detect: using main provider gemini (gemma-4-31b-it)
2026-04-29 07:23:31,944 INFO agent.auxiliary_client: Auxiliary auto-detect: using main provider gemini (gemma-4-31b-it)
2026-04-29 07:23:32,487 ERROR [20260429_072330_adb52691] root: Non-retryable client error: Error code: 400 - [{'error': {'code': 400, 'message': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.', 'status': 'INVALID_ARGUMENT', 'details': [{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'description': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.'}]}]}}]
2026-04-29 07:23:32,549 INFO gateway.run: response ready: platform=telegram chat=- time=2.2s api_calls=1 response=365 chars
2026-04-29 07:23:32,551 INFO gateway.run: Skipping transcript persistence for failed request in session 20260429_072330_adb52691 to prevent session growth loop.
2026-04-29 07:23:32,554 INFO gateway.platforms.base: [Telegram] Sending response (365 chars) to -
2026-04-29 07:23:53,712 INFO gateway.platforms.telegram: [Telegram] Flushing text batch agent:main:telegram:dm: (12 chars)
2026-04-29 07:23:53,713 INFO gateway.run: inbound message: platform=telegram user=Tim Alosi chat= msg='good morning'
2026-04-29 07:23:54,202 INFO [20260429_072330_adb52691] agent.auxiliary_client: Auxiliary auto-detect: using main provider gemini (gemma-4-31b-it)
2026-04-29 07:23:54,439 ERROR [20260429_072353_00b7ad59] root: Non-retryable client error: Error code: 400 - [{'error': {'code': 400, 'message': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.', 'status': 'INVALID_ARGUMENT', 'details': [{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'description': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.'}]}]}}]
2026-04-29 07:23:54,492 INFO gateway.run: response ready: platform=telegram chat= time=0.8s api_calls=1 response=365 chars
2026-04-29 07:23:54,493 INFO gateway.run: Skipping transcript persistence for failed request in session 20260429_072353_00b7ad59 to prevent session growth loop.
2026-04-29 07:23:54,495 INFO gateway.platforms.base: [Telegram] Sending response (365 chars) to 
2026-04-29 07:30:31,425 INFO gateway.run: Stopping gateway for restart...
2026-04-29 07:30:31,718 INFO telegram.ext.Application: Application is stopping. This might take a moment.
2026-04-29 07:30:31,719 INFO apscheduler.scheduler: Scheduler has been shut down
2026-04-29 07:30:31,729 INFO telegram.ext.Application: Application.stop() complete
2026-04-29 07:30:31,737 INFO gateway.platforms.telegram: [Telegram] Disconnected from Telegram
2026-04-29 07:30:31,737 INFO gateway.run: ✓ telegram disconnected
2026-04-29 07:30:31,746 INFO gateway.run: Gateway stopped
2026-04-29 07:30:31,746 INFO gateway.run: Cron ticker stopped
2026-04-29 07:30:41,820 INFO hermes_cli.plugins: Plugin 'openai' registered image_gen provider: openai
2026-04-29 07:30:41,821 INFO hermes_cli.plugins: Plugin 'openai-codex' registered image_gen provider: openai-codex
2026-04-29 07:30:41,822 INFO hermes_cli.plugins: Plugin 'xai' registered image_gen provider: xai
2026-04-29 07:30:41,879 INFO hermes_cli.plugins: Plugin discovery complete: 7 found, 4 enabled
2026-04-29 07:30:49,882 INFO run_agent: Loaded environment variables from /home/castor/.hermes/.env
2026-04-29 07:30:50,229 INFO hermes_cli.plugins: Plugin 'openai' registered image_gen provider: openai
2026-04-29 07:30:50,229 INFO hermes_cli.plugins: Plugin 'openai-codex' registered image_gen provider: openai-codex
2026-04-29 07:30:50,230 INFO hermes_cli.plugins: Plugin 'xai' registered image_gen provider: xai
2026-04-29 07:30:50,244 INFO hermes_cli.plugins: Plugin discovery complete: 7 found, 4 enabled
2026-04-29 07:30:50,727 INFO agent.auxiliary_client: Vision auto-detect: using main provider gemini (gemma-4-31b-it)
2026-04-29 07:30:51,036 INFO agent.auxiliary_client: Auxiliary auto-detect: using main provider gemini (gemma-4-31b-it)
2026-04-29 07:30:51,675 INFO run_agent: Loaded environment variables from /home/castor/.hermes/.env
2026-04-29 07:30:52,056 INFO hermes_cli.plugins: Plugin 'openai' registered image_gen provider: openai
2026-04-29 07:30:52,056 INFO hermes_cli.plugins: Plugin 'openai-codex' registered image_gen provider: openai-codex
2026-04-29 07:30:52,056 INFO hermes_cli.plugins: Plugin 'xai' registered image_gen provider: xai
2026-04-29 07:30:52,057 INFO hermes_cli.plugins: Plugin discovery complete: 7 found, 4 enabled
2026-04-29 07:30:56,759 ERROR [20260429_073049_1ff9e4] root: Non-retryable client error: Error code: 400 - [{'error': {'code': 400, 'message': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.', 'status': 'INVALID_ARGUMENT', 'details': [{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'description': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.'}]}]}}]
2026-04-29 07:31:02,400 INFO hermes_cli.plugins: Plugin 'openai' registered image_gen provider: openai
2026-04-29 07:31:02,400 INFO hermes_cli.plugins: Plugin 'openai-codex' registered image_gen provider: openai-codex
2026-04-29 07:31:02,401 INFO hermes_cli.plugins: Plugin 'xai' registered image_gen provider: xai
2026-04-29 07:31:02,458 INFO hermes_cli.plugins: Plugin discovery complete: 7 found, 4 enabled
2026-04-29 07:31:03,052 INFO gateway.run: Starting Hermes Gateway...
2026-04-29 07:31:03,052 INFO gateway.run: Session storage: /home/castor/.hermes/sessions
2026-04-29 07:31:03,056 INFO gateway.run: Previous gateway exited cleanly — skipping session suspension
2026-04-29 07:31:03,185 INFO gateway.run: Connecting to telegram...
2026-04-29 07:31:03,329 INFO gateway.platforms.telegram_network: DoH discovery yielded no new IPs (system DNS: ); using seed fallback IPs 
2026-04-29 07:31:03,329 INFO gateway.platforms.telegram: [Telegram] Auto-discovered Telegram fallback IPs: 
2026-04-29 07:31:03,329 INFO gateway.platforms.telegram: [Telegram] Telegram fallback IPs active: 
2026-04-29 07:31:03,648 INFO apscheduler.scheduler: Scheduler started
2026-04-29 07:31:03,648 INFO telegram.ext.Application: Application started
2026-04-29 07:31:04,190 INFO gateway.platforms.telegram: [Telegram] Telegram menu: 100 commands registered, 27 hidden (over 100 limit). Use /commands for full list.
2026-04-29 07:31:04,191 INFO gateway.platforms.telegram: [Telegram] Connected to Telegram (polling mode)
2026-04-29 07:31:04,199 INFO gateway.run: ✓ telegram connected
2026-04-29 07:31:04,199 INFO gateway.run: Gateway running with 1 platform(s)
2026-04-29 07:31:04,203 INFO gateway.run: Channel directory built: 2 target(s)
2026-04-29 07:31:04,203 INFO gateway.run: Press Ctrl+C to stop
2026-04-29 07:31:04,218 INFO gateway.run: Cron ticker started (interval=60s)
2026-04-29 07:31:26,416 ERROR [20260429_073049_1ff9e4] root: Non-retryable client error: Error code: 400 - [{'error': {'code': 400, 'message': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.', 'status': 'INVALID_ARGUMENT', 'details': [{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'description': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.'}]}]}}]
2026-04-29 07:32:21,852 INFO root: Model switched in-place: gemma-4-31b-it (gemini) -> gemini-2.5-flash-lite (gemini)
2026-04-29 07:32:22,407 INFO run_agent: Loaded environment variables from /home/castor/.hermes/.env
2026-04-29 07:32:22,774 INFO hermes_cli.plugins: Plugin 'openai' registered image_gen provider: openai
2026-04-29 07:32:22,774 INFO hermes_cli.plugins: Plugin 'openai-codex' registered image_gen provider: openai-codex
2026-04-29 07:32:22,775 INFO hermes_cli.plugins: Plugin 'xai' registered image_gen provider: xai
2026-04-29 07:32:22,776 INFO hermes_cli.plugins: Plugin discovery complete: 7 found, 4 enabled
2026-04-29 07:32:27,677 ERROR [20260429_073049_1ff9e4] root: Non-retryable client error: Error code: 400 - [{'error': {'code': 400, 'message': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.', 'status': 'INVALID_ARGUMENT', 'details': [{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'description': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.'}]}]}}]
2026-04-29 07:32:33,253 ERROR [20260429_073049_1ff9e4] root: Non-retryable client error: Error code: 400 - [{'error': {'code': 400, 'message': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.', 'status': 'INVALID_ARGUMENT', 'details': [{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'description': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.'}]}]}}]
2026-04-29 07:33:53,661 INFO hermes_cli.plugins: Plugin 'openai' registered image_gen provider: openai
2026-04-29 07:33:53,661 INFO hermes_cli.plugins: Plugin 'openai-codex' registered image_gen provider: openai-codex
2026-04-29 07:33:53,661 INFO hermes_cli.plugins: Plugin 'xai' registered image_gen provider: xai
2026-04-29 07:33:53,717 INFO hermes_cli.plugins: Plugin discovery complete: 7 found, 4 enabled
2026-04-29 07:33:54,692 INFO run_agent: Loaded environment variables from /home/castor/.hermes/.env
2026-04-29 07:33:54,991 INFO hermes_cli.plugins: Plugin 'openai' registered image_gen provider: openai
2026-04-29 07:33:54,991 INFO hermes_cli.plugins: Plugin 'openai-codex' registered image_gen provider: openai-codex
2026-04-29 07:33:54,992 INFO hermes_cli.plugins: Plugin 'xai' registered image_gen provider: xai
2026-04-29 07:33:54,994 INFO hermes_cli.plugins: Plugin discovery complete: 7 found, 4 enabled
2026-04-29 07:33:55,424 INFO agent.auxiliary_client: Vision auto-detect: using main provider gemini (gemma-4-31b-it)
2026-04-29 07:33:55,718 INFO agent.auxiliary_client: Auxiliary auto-detect: using main provider gemini (gemma-4-31b-it)
2026-04-29 07:33:56,261 INFO run_agent: Loaded environment variables from /home/castor/.hermes/.env
2026-04-29 07:33:56,647 INFO hermes_cli.plugins: Plugin 'openai' registered image_gen provider: openai
2026-04-29 07:33:56,648 INFO hermes_cli.plugins: Plugin 'openai-codex' registered image_gen provider: openai-codex
2026-04-29 07:33:56,648 INFO hermes_cli.plugins: Plugin 'xai' registered image_gen provider: xai
2026-04-29 07:33:56,649 INFO hermes_cli.plugins: Plugin discovery complete: 7 found, 4 enabled
2026-04-29 07:34:02,296 ERROR [20260429_073354_4abb33] root: Non-retryable client error: Error code: 400 - [{'error': {'code': 400, 'message': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.', 'status': 'INVALID_ARGUMENT', 'details': [{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'description': 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.'}]}]}}]

Operating System

Ubuntu 24.04

Python Version

No response

Hermes Version

0.11.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

    P1High — major feature broken, no workaroundcomp/agentCore agent loop, run_agent.py, prompt builderprovider/geminiGoogle Gemini (AI Studio, Cloud Code)type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions