hermes - ✅(Solved) Fix [Bug]: Model calls to google provider return 400 error with Invalid JSON payload on thinking_config [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#17426Fetched 2026-04-30 06:47:39
View on GitHub
Comments
0
Participants
1
Timeline
8
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×1mentioned ×1renamed ×1

Error Message

--- 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.'}]}]}}]

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

PR fix notes

PR #17441: fix(transport): omit thinking_config for Gemma on the gemini provider (#17426)

Description (problem / solution / changelog)

Summary

  • Hermes was sending extra_body.thinking_config for every chat call routed through the gemini provider — including Gemma (gemma-4-31b-it), PaLM, and any other non-Gemini Google model on the same endpoint
  • Those models reject the field at the API edge: HTTP 400 — Unknown name \"thinking_config\": Cannot find field
  • Result: Gemma users on the gemini provider exit immediately on every chat (#17426)

The bug

chat_completions.py:365-368 builds thinking_config whenever provider_name in {\"gemini\", \"google-gemini-cli\"}:

```python if provider_name in {"gemini", "google-gemini-cli"}: thinking_config = _build_gemini_thinking_config(model, reasoning_config) if thinking_config: extra_body["thinking_config"] = thinking_config ```

The helper unconditionally returned a dict — never None — for any model under those providers. So extra_body[\"thinking_config\"] was always set, including for Gemma. The Gemini API's strict request validator rejects unknown fields, even the polite {\"includeThoughts\": False} shape.

The reporter's payload:

``` provider: gemini model: gemma-4-31b-it → HTTP 400: 'Invalid JSON payload received. Unknown name "thinking_config": Cannot find field.' ```

The fix

_build_gemini_thinking_config() now mirrors the same family-detection pattern it already uses for Gemini-2.5 vs Gemini-3 clamping: normalise the model id, strip an OpenRouter-style google/ prefix, and short-circuit to None when the result doesn't start with gemini.

We return None rather than {\"includeThoughts\": False} because the API rejects the field name itself — there is no "off" shape that's safe.

The Gemini guard fires after the google/ strip, so:

  • gemini-2.5-flash → still gets thinking_config
  • gemini-3-flash-preview → still gets thinking_config
  • google/gemini-3.1-pro-preview → still gets thinking_config (existing behaviour preserved)
  • gemma-4-31b-it → no thinking_config
  • google/gemma-4-31b-it → no thinking_config

Test plan

  • Focused regression: 3 new cases in tests/agent/transports/test_chat_completions.py:
    • test_gemma_does_not_receive_thinking_config — reasoning enabled, high effort → field absent
    • test_gemma_disabled_reasoning_still_omits_thinking_configenabled: False → field absent (proves the omit-not-disable contract)
    • test_google_prefixed_gemma_also_omits_thinking_config — OpenRouter-style id → field absent
  • Adjacent suite: existing 5 Gemini cases (`test_gemini_reasoning`, `test_gemini_25_`, `test_gemini_pro_`, etc.) all still pass — the new guard only kicks in for non-Gemini models
  • Regression guard: stashing the chat_completions.py change makes both Gemma tests fail at `assert "thinking_config" not in kw.get("extra_body", {})` (the field is present); restoring the fix flips them back to passing
  • Full file run: `pytest tests/agent/transports/test_chat_completions.py` → 57 passed

Contract Protected

ModelProviderreasoning_configthinking_config sent?
gemini-2.5-flashgeminienabled✅ yes
gemini-3-flash-previewgeminienabled✅ yes (with thinkingLevel)
gemini-3-flash-previewgeminidisabled✅ yes (includeThoughts: False)
google/gemini-3.1-pro-previewgeminienabled✅ yes (with clamped level)
gemma-4-31b-itgeminienabled❌ omitted (#17426)
gemma-4-31b-itgeminidisabled❌ omitted
google/gemma-4-31b-itgeminienabled❌ omitted

Fixes #17426

Changed files

  • agent/transports/chat_completions.py (modified, +12/-3)
  • tests/agent/transports/test_chat_completions.py (modified, +40/-0)

Code Example

--- 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.'}]}]}}]

---
RAW_BUFFERClick to expand / collapse

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

extent analysis

TL;DR

The most likely fix is to remove or update the "thinking_config" field from the JSON payload to match the expected fields by the Google API.

Guidance

  • Review the code that constructs the JSON payload sent to the Google API to identify where the "thinking_config" field is being added.
  • Check the Google API documentation to confirm the expected fields for the JSON payload.
  • Update the code to remove or rename the "thinking_config" field to match the expected fields.
  • Verify that the updated code constructs a valid JSON payload that can be successfully processed by the Google API.

Example

No code snippet is provided as the issue does not include the relevant code. However, the fix will involve updating the code that constructs the JSON payload to remove or update the "thinking_config" field.

Notes

The exact fix will depend on the specific code that constructs the JSON payload and the expected fields for the Google API. Additional debugging may be necessary to identify the root cause of the issue.

Recommendation

Apply workaround: Remove or update the "thinking_config" field from the JSON payload to match the expected fields by the Google API. This should resolve the "Invalid JSON payload received" error and allow the API request to succeed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Bug]: Model calls to google provider return 400 error with Invalid JSON payload on thinking_config [1 pull requests, 1 participants]