Skip to content

Hide unsupported MCP bearer_token from config schema#19294

Merged
etraut-openai merged 1 commit intomainfrom
etraut/hide-unsupported-mcp-bearer-token-schema
Apr 24, 2026
Merged

Hide unsupported MCP bearer_token from config schema#19294
etraut-openai merged 1 commit intomainfrom
etraut/hide-unsupported-mcp-bearer-token-schema

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai commented Apr 24, 2026

Summary

Fixes #19275.

Codex runtime rejects inline MCP bearer_token config entries and asks users to configure bearer_token_env_var instead, but the generated config schema still advertised mcp_servers.<name>.bearer_token as a supported field. That made editor/schema validation disagree with runtime validation.

This keeps bearer_token in RawMcpServerConfig so Codex can continue producing the targeted runtime error for recent or existing configs, but skips the field during schemars generation. The checked-in core/config.schema.json fixture now exposes bearer_token_env_var without exposing unsupported inline bearer_token.

Verification

  • Added config_schema_hides_unsupported_inline_mcp_bearer_token to assert the generated schema hides bearer_token while preserving bearer_token_env_var.
  • Ran cargo test -p codex-config.
  • Ran cargo test -p codex-core config_schema.

@etraut-openai etraut-openai requested a review from a team as a code owner April 24, 2026 05:58
@chanwooyang1
Copy link
Copy Markdown

Thanks for the quick fix! The PR scope matches the schema/runtime mismatch I was seeing.

@etraut-openai etraut-openai merged commit 6f87eb0 into main Apr 24, 2026
25 checks passed
@etraut-openai etraut-openai deleted the etraut/hide-unsupported-mcp-bearer-token-schema branch April 24, 2026 07:17
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Config schema exposes unsupported MCP bearer_token field

3 participants