Commit fe91d33
fix: Remove authorization from provider data (#4161)
# What does this PR do?
- Remove backward compatibility for authorization in mcp_headers
- Enforce authorization must use dedicated parameter
- Add validation error if Authorization found in provider_data headers
- Update test_mcp.py to use authorization parameter
- Update test_mcp_json_schema.py to use authorization parameter
- Update test_tools_with_schemas.py to use authorization parameter
- Update documentation to show the change in the authorization approach
Breaking Change:
- Authorization can no longer be passed via mcp_headers in provider_data
- Users must use the dedicated 'authorization' parameter instead
- Clear error message guides users to the new approach"
## Test Plan
CI
---------
Co-authored-by: Omar Abdelwahab <omara@fb.com>
Co-authored-by: Ashwin Bharambe <ashwin.bharambe@gmail.com>1 parent 0128eff commit fe91d33
File tree
5 files changed
+61
-172
lines changed- docs/docs/building_applications
- src/llama_stack/providers/remote/tool_runtime/model_context_protocol
- tests/integration
- inference
- tool_runtime
5 files changed
+61
-172
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
124 | 120 | | |
125 | 121 | | |
126 | 122 | | |
| |||
Lines changed: 26 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
| 51 | + | |
| 52 | + | |
54 | 53 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 54 | + | |
61 | 55 | | |
62 | 56 | | |
63 | 57 | | |
| |||
69 | 63 | | |
70 | 64 | | |
71 | 65 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 66 | + | |
| 67 | + | |
78 | 68 | | |
79 | 69 | | |
80 | 70 | | |
81 | 71 | | |
82 | 72 | | |
83 | 73 | | |
84 | | - | |
| 74 | + | |
85 | 75 | | |
86 | 76 | | |
87 | | - | |
| 77 | + | |
88 | 78 | | |
89 | | - | |
| 79 | + | |
90 | 80 | | |
91 | | - | |
92 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
93 | 86 | | |
94 | 87 | | |
95 | | - | |
96 | | - | |
97 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
98 | 92 | | |
99 | 93 | | |
100 | 94 | | |
101 | 95 | | |
102 | 96 | | |
103 | 97 | | |
104 | | - | |
105 | 98 | | |
106 | 99 | | |
107 | 100 | | |
108 | 101 | | |
109 | 102 | | |
110 | 103 | | |
111 | 104 | | |
112 | | - | |
113 | | - | |
| 105 | + | |
114 | 106 | | |
115 | 107 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
| |||
193 | 191 | | |
194 | 192 | | |
195 | 193 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
| 194 | + | |
208 | 195 | | |
209 | 196 | | |
210 | 197 | | |
211 | | - | |
| 198 | + | |
212 | 199 | | |
213 | 200 | | |
214 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
| |||
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
58 | 43 | | |
59 | 44 | | |
60 | 45 | | |
61 | 46 | | |
| 47 | + | |
62 | 48 | | |
63 | 49 | | |
64 | 50 | | |
65 | | - | |
| 51 | + | |
66 | 52 | | |
67 | 53 | | |
68 | 54 | | |
| |||
0 commit comments