mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
fix: update tests to use new mcp_authorization field
Updates integration tests to use the new mcp_authorization field
instead of the old method of passing Authorization in mcp_headers.
Changes:
- tests/integration/tool_runtime/test_mcp.py
- tests/integration/inference/test_tools_with_schemas.py
- tests/integration/tool_runtime/test_mcp_json_schema.py (6 occurrences)
All tests now use:
provider_data = {"mcp_authorization": {uri: AUTH_TOKEN}}
Instead of the old rejected format:
provider_data = {"mcp_headers": {uri: {"Authorization": f"Bearer {AUTH_TOKEN}"}}}
This aligns with the security architecture that prevents
accidentally leaking inference tokens to MCP servers.
This commit is contained in:
parent
1a7ba683e3
commit
735831206d
3 changed files with 9 additions and 11 deletions
|
|
@ -43,10 +43,8 @@ def test_mcp_invocation(llama_stack_client, text_model_id, mcp_server):
|
|||
)
|
||||
|
||||
provider_data = {
|
||||
"mcp_headers": {
|
||||
uri: {
|
||||
"Authorization": f"Bearer {AUTH_TOKEN}",
|
||||
},
|
||||
"mcp_authorization": {
|
||||
uri: AUTH_TOKEN, # Token
|
||||
},
|
||||
}
|
||||
auth_headers = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue