mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
precommit run
This commit is contained in:
parent
0f0aa6a6c5
commit
c353873774
4 changed files with 8 additions and 18 deletions
|
|
@ -7133,13 +7133,11 @@ components:
|
||||||
- type: array
|
- type: array
|
||||||
- type: object
|
- type: object
|
||||||
description: >-
|
description: >-
|
||||||
(Optional) HTTP headers to include when connecting to the server (cannot
|
(Optional) HTTP headers to include when connecting to the server
|
||||||
contain Authorization)
|
|
||||||
authorization:
|
authorization:
|
||||||
type: string
|
type: string
|
||||||
description: >-
|
description: >-
|
||||||
(Optional) OAuth access token for authenticating with the MCP server (excluded
|
(Optional) OAuth access token for authenticating with the MCP server
|
||||||
from responses)
|
|
||||||
require_approval:
|
require_approval:
|
||||||
oneOf:
|
oneOf:
|
||||||
- type: string
|
- type: string
|
||||||
|
|
|
||||||
6
docs/static/llama-stack-spec.yaml
vendored
6
docs/static/llama-stack-spec.yaml
vendored
|
|
@ -6417,13 +6417,11 @@ components:
|
||||||
- type: array
|
- type: array
|
||||||
- type: object
|
- type: object
|
||||||
description: >-
|
description: >-
|
||||||
(Optional) HTTP headers to include when connecting to the server (cannot
|
(Optional) HTTP headers to include when connecting to the server
|
||||||
contain Authorization)
|
|
||||||
authorization:
|
authorization:
|
||||||
type: string
|
type: string
|
||||||
description: >-
|
description: >-
|
||||||
(Optional) OAuth access token for authenticating with the MCP server (excluded
|
(Optional) OAuth access token for authenticating with the MCP server
|
||||||
from responses)
|
|
||||||
require_approval:
|
require_approval:
|
||||||
oneOf:
|
oneOf:
|
||||||
- type: string
|
- type: string
|
||||||
|
|
|
||||||
6
docs/static/stainless-llama-stack-spec.yaml
vendored
6
docs/static/stainless-llama-stack-spec.yaml
vendored
|
|
@ -7133,13 +7133,11 @@ components:
|
||||||
- type: array
|
- type: array
|
||||||
- type: object
|
- type: object
|
||||||
description: >-
|
description: >-
|
||||||
(Optional) HTTP headers to include when connecting to the server (cannot
|
(Optional) HTTP headers to include when connecting to the server
|
||||||
contain Authorization)
|
|
||||||
authorization:
|
authorization:
|
||||||
type: string
|
type: string
|
||||||
description: >-
|
description: >-
|
||||||
(Optional) OAuth access token for authenticating with the MCP server (excluded
|
(Optional) OAuth access token for authenticating with the MCP server
|
||||||
from responses)
|
|
||||||
require_approval:
|
require_approval:
|
||||||
oneOf:
|
oneOf:
|
||||||
- type: string
|
- type: string
|
||||||
|
|
|
||||||
|
|
@ -104,18 +104,14 @@ def test_mcp_authorization_error_when_header_provided(compat_client, text_model_
|
||||||
"type": "mcp",
|
"type": "mcp",
|
||||||
"server_label": "header-auth-mcp",
|
"server_label": "header-auth-mcp",
|
||||||
"server_url": "<FILLED_BY_TEST_RUNNER>",
|
"server_url": "<FILLED_BY_TEST_RUNNER>",
|
||||||
"headers": {
|
"headers": {"Authorization": f"Bearer {test_token}"}, # Security risk - should be rejected
|
||||||
"Authorization": f"Bearer {test_token}"
|
|
||||||
}, # Security risk - should be rejected
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
mcp_server_info,
|
mcp_server_info,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Create response - should raise ValueError for security reasons
|
# Create response - should raise ValueError for security reasons
|
||||||
with pytest.raises(
|
with pytest.raises(ValueError, match="Authorization header cannot be passed via 'headers'"):
|
||||||
ValueError, match="Authorization header cannot be passed via 'headers'"
|
|
||||||
):
|
|
||||||
compat_client.responses.create(
|
compat_client.responses.create(
|
||||||
model=text_model_id,
|
model=text_model_id,
|
||||||
input="What is the boiling point of myawesomeliquid?",
|
input="What is the boiling point of myawesomeliquid?",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue