gemini-cli - ✅(Solved) Fix Bug: 'text.response' in custom theme triggers validation error (unrecognized key) [2 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
google-gemini/gemini-cli#25689Fetched 2026-04-20 12:15:20
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1

The text.response key in a custom theme configuration triggers a validation error: Invalid configuration... Unrecognized key(s) in object: 'response'.

Error Message

The text.response key in a custom theme configuration triggers a validation error: Invalid configuration... Unrecognized key(s) in object: 'response'.

Root Cause

The text.response key in a custom theme configuration triggers a validation error: Invalid configuration... Unrecognized key(s) in object: 'response'.

Fix Action

Fixed

PR fix notes

PR #25715: fix(theme): add missing 'response' property to text schema in CustomTheme

Description (problem / solution / changelog)

Problem

Setting text.response in a custom theme triggers a validation error at startup:

Invalid configuration... Unrecognized key(s) in object: 'response'

This is because the text object in the CustomTheme schema definition has additionalProperties: false but is missing the response property.

Reported in issue #25689.

Root cause

In settingsSchema.ts, the text properties block only lists primary, secondary, link, and accent. However, the runtime theme logic explicitly uses text.response:

response: customTheme.text?.response ?? customTheme.text?.primary ?? colors.Foreground

Since the schema has additionalProperties: false, any key not listed there is rejected — even though it's a documented, supported field.

Fix

Add response: { type: 'string' } to the text properties in the CustomTheme schema, consistent with the other color properties.

Fixes #25689

Changed files

  • packages/cli/src/config/settingsSchema.ts (modified, +1/-0)

PR #25729: fix(cli): add missing custom theme properties to settings schema

Description (problem / solution / changelog)

Summary

This PR fixes a validation error when using certain properties in a custom theme configuration. Specifically, it adds support for text.response, ui.active, and ui.focus in the settings schema.

Details

  • Added missing properties (text.response, ui.active, ui.focus) to the CustomTheme definition in packages/cli/src/config/settingsSchema.ts.
  • Synchronized the CustomTheme interface in packages/core/src/config/config.ts by adding border.focused (which was already in the schema but missing from the interface).
  • Added a comprehensive validation test case in packages/cli/src/config/settings-validation.test.ts to verify that these properties are now correctly accepted.

Related Issues

Fixes https://github.com/google-gemini/gemini-cli/issues/25689

How to Validate

  1. Run the new validation tests: npm test -w @google/gemini-cli -- src/config/settings-validation.test.ts
  2. Manually verify by creating a custom theme in your settings:
    ui:
      customThemes:
        test-theme:
          type: custom
          name: "Test Theme"
          text:
            response: "#00ff00"
    The CLI should no longer warn about unrecognized keys.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on MacOS

Changed files

  • packages/cli/src/config/settings-validation.test.ts (modified, +30/-0)
  • packages/cli/src/config/settingsSchema.ts (modified, +3/-0)
  • packages/core/src/config/config.ts (modified, +1/-0)

Code Example

response: customTheme.text?.response ?? customTheme.text?.primary ?? colors.Foreground

---

"text": {
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "primary": { "type": "string" },
    "secondary": { "type": "string" },
    "link": { "type": "string" },
    "accent": { "type": "string" }
  }
}
RAW_BUFFERClick to expand / collapse

Description

The text.response key in a custom theme configuration triggers a validation error: Invalid configuration... Unrecognized key(s) in object: 'response'.

Expected Behavior

The response key should be recognized as a valid property of the text object in a custom theme, as it is documented in cli_help and explicitly used in the source code to color model responses.

Actual Behavior

The CLI flags response as an unrecognized key during startup validation, although the color is correctly applied in the terminal.

Evidence

In the bundled source code (chunk-7DZN7VCC.js), the CLI explicitly looks for this key:

response: customTheme.text?.response ?? customTheme.text?.primary ?? colors.Foreground

However, the CustomTheme definition in the validation schema (and the hosted settings.schema.json) is missing the response property under text and has additionalProperties: false set:

"text": {
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "primary": { "type": "string" },
    "secondary": { "type": "string" },
    "link": { "type": "string" },
    "accent": { "type": "string" }
  }
}

Environment

  • Gemini CLI Version: 0.38.2
  • OS: Darwin (macOS)

extent analysis

TL;DR

Update the settings.schema.json to include the response property under the text object to fix the validation error.

Guidance

  • The validation error is caused by the missing response property in the text object of the settings.schema.json file.
  • To fix this, add the response property to the text object in the schema with the correct type, for example: "response": { "type": "string" }.
  • Verify that the response key is recognized as a valid property by checking the CLI validation output after updating the schema.
  • Consider updating the CustomTheme definition in the validation schema to match the actual properties used in the source code.

Example

"text": {
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "primary": { "type": "string" },
    "secondary": { "type": "string" },
    "link": { "type": "string" },
    "accent": { "type": "string" },
    "response": { "type": "string" }
  }
}

Notes

This fix assumes that the response property should be a string, as it is used to color model responses. If the type is different, update the schema accordingly.

Recommendation

Apply the workaround by updating the settings.schema.json file to include the response property, as this is a specific fix for the validation error and does not require an upgrade to a fixed version.

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

gemini-cli - ✅(Solved) Fix Bug: 'text.response' in custom theme triggers validation error (unrecognized key) [2 pull requests, 1 participants]