precommit run

This commit is contained in:
Omar Abdelwahab 2025-11-07 14:54:33 -08:00
parent 0f0aa6a6c5
commit c353873774
4 changed files with 8 additions and 18 deletions

View file

@ -7133,13 +7133,11 @@ components:
- type: array
- type: object
description: >-
(Optional) HTTP headers to include when connecting to the server (cannot
contain Authorization)
(Optional) HTTP headers to include when connecting to the server
authorization:
type: string
description: >-
(Optional) OAuth access token for authenticating with the MCP server (excluded
from responses)
(Optional) OAuth access token for authenticating with the MCP server
require_approval:
oneOf:
- type: string

View file

@ -6417,13 +6417,11 @@ components:
- type: array
- type: object
description: >-
(Optional) HTTP headers to include when connecting to the server (cannot
contain Authorization)
(Optional) HTTP headers to include when connecting to the server
authorization:
type: string
description: >-
(Optional) OAuth access token for authenticating with the MCP server (excluded
from responses)
(Optional) OAuth access token for authenticating with the MCP server
require_approval:
oneOf:
- type: string

View file

@ -7133,13 +7133,11 @@ components:
- type: array
- type: object
description: >-
(Optional) HTTP headers to include when connecting to the server (cannot
contain Authorization)
(Optional) HTTP headers to include when connecting to the server
authorization:
type: string
description: >-
(Optional) OAuth access token for authenticating with the MCP server (excluded
from responses)
(Optional) OAuth access token for authenticating with the MCP server
require_approval:
oneOf:
- type: string

View file

@ -104,18 +104,14 @@ def test_mcp_authorization_error_when_header_provided(compat_client, text_model_
"type": "mcp",
"server_label": "header-auth-mcp",
"server_url": "<FILLED_BY_TEST_RUNNER>",
"headers": {
"Authorization": f"Bearer {test_token}"
}, # Security risk - should be rejected
"headers": {"Authorization": f"Bearer {test_token}"}, # Security risk - should be rejected
}
],
mcp_server_info,
)
# Create response - should raise ValueError for security reasons
with pytest.raises(
ValueError, match="Authorization header cannot be passed via 'headers'"
):
with pytest.raises(ValueError, match="Authorization header cannot be passed via 'headers'"):
compat_client.responses.create(
model=text_model_id,
input="What is the boiling point of myawesomeliquid?",