# NousResearch/hermes-agent · Gemini systemInstruction missing role field causes HTTP 500

## Open now

- Nothing open on GitHub.

A bug where the systemInstruction payload sent to Gemini/Gemma models omitted a required role field, resulting in HTTP 500 errors. Multiple fix attempts address this by adding the missing role field to the native adapter.

## TL;DR

- 7 member(s): 0 open issue(s), 2 closed issue(s), 0 open PR(s), 1 merged PR(s), 4 PR(s) closed without merging.
- A fix was merged to main in PR #45605. Verify it addresses your case.
- **Recommended:** read PR #45605 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `partially_resolved` · deciding PR(s): `pr-45605`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_PARTIAL`): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
- Members outside that structural core may belong to a different underlying problem.
- Pairwise link density `0.26`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Closed / duplicate issues

- #20244: \[Bug\]:   Error: HTTP 500: Gemini HTTP 500 (INTERNAL): Internal error encountered.
- #27121: fix(gemini): systemInstruction missing required role field causes HTTP 500 on Gemma models

## Prior & competing PRs

- **#45605: fix(gemini): add role field to systemInstruction**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `agent/gemini_native_adapter.py`, `scripts/release.py`, `tests/agent/test_gemini_native_adapter.py`
- **#27123: fix(gemini): add missing role field to systemInstruction for Gemma compatibility**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `018009bc3`, `#55585`, `#27123`
- **#27159: fix(gemini): include role in native systemInstruction payload**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `a33bb14c41cafdc70f95d758d6f8a288e611dfbc`, `#45605`, `#36047`
- **#27215: fix(gemini): add required role field to systemInstruction in native adapter**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `eed61a12517b01fa9a3117ffacf80809a23d369f`, `#45605`, `#27121`
- **#36047: fix(gemini): add role field to systemInstruction for Gemma compatibility (#27121)**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `eed61a125`, `#45605`

## Fix status

- Merged to main in PR #45605 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-06-13`.
- Subsystem: `agent`
