Skip to content

Commit 209dc1f

Browse files
committed
fix: allow litellm security patch
1 parent def7fc0 commit 209dc1f

8 files changed

Lines changed: 399 additions & 181 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ authors = [
99
]
1010

1111
dependencies = [
12-
"httpx>=0.27.2,<0.28",
12+
"httpx>=0.28.1,<0.29",
1313
"pydantic>=2.0.0, <3",
1414
"typing-extensions>=4.14, <5",
1515
"anyio>=3.5.0, <5",
@@ -28,7 +28,7 @@ dependencies = [
2828
"temporalio>=1.26.0,<2",
2929
"aiohttp>=3.10.10,<4",
3030
"redis>=5.2.0,<6",
31-
"litellm>=1.83.0,<2",
31+
"litellm>=1.83.7,<2",
3232
"kubernetes>=25.0.0,<36.0.0",
3333
"jinja2>=3.1.3,<4",
3434
"mcp[cli]>=1.4.1",

src/agentex/lib/core/tracing/processors/agentex_tracing_processor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def on_span_start(self, span: Span) -> None:
2626
input=span.input,
2727
output=span.output,
2828
parent_id=span.parent_id,
29+
task_id=span.task_id,
2930
)
3031

3132
@override
@@ -94,6 +95,7 @@ async def on_span_start(self, span: Span) -> None:
9495
input=span.input,
9596
output=span.output,
9697
data=span.data,
98+
task_id=span.task_id,
9799
)
98100

99101
@override

src/agentex/resources/spans.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def create(
5757
input: Union[Dict[str, object], Iterable[Dict[str, object]], None] | Omit = omit,
5858
output: Union[Dict[str, object], Iterable[Dict[str, object]], None] | Omit = omit,
5959
parent_id: Optional[str] | Omit = omit,
60+
task_id: Optional[str] | Omit = omit,
6061
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6162
# The extra values given here take precedence over values defined on the client or passed to this method.
6263
extra_headers: Headers | None = None,
@@ -86,6 +87,8 @@ def create(
8687
8788
parent_id: ID of the parent span if this is a child span in a trace
8889
90+
task_id: ID of the task this span belongs to
91+
8992
extra_headers: Send extra headers
9093
9194
extra_query: Add additional query parameters to the request
@@ -107,6 +110,7 @@ def create(
107110
"input": input,
108111
"output": output,
109112
"parent_id": parent_id,
113+
"task_id": task_id,
110114
},
111115
span_create_params.SpanCreateParams,
112116
),
@@ -160,6 +164,7 @@ def update(
160164
output: Union[Dict[str, object], Iterable[Dict[str, object]], None] | Omit = omit,
161165
parent_id: Optional[str] | Omit = omit,
162166
start_time: Union[str, datetime, None] | Omit = omit,
167+
task_id: Optional[str] | Omit = omit,
163168
trace_id: Optional[str] | Omit = omit,
164169
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
165170
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -186,6 +191,8 @@ def update(
186191
187192
start_time: The time the span started
188193
194+
task_id: ID of the task this span belongs to
195+
189196
trace_id: Unique identifier for the trace this span belongs to
190197
191198
extra_headers: Send extra headers
@@ -209,6 +216,7 @@ def update(
209216
"output": output,
210217
"parent_id": parent_id,
211218
"start_time": start_time,
219+
"task_id": task_id,
212220
"trace_id": trace_id,
213221
},
214222
span_update_params.SpanUpdateParams,
@@ -300,6 +308,7 @@ async def create(
300308
input: Union[Dict[str, object], Iterable[Dict[str, object]], None] | Omit = omit,
301309
output: Union[Dict[str, object], Iterable[Dict[str, object]], None] | Omit = omit,
302310
parent_id: Optional[str] | Omit = omit,
311+
task_id: Optional[str] | Omit = omit,
303312
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
304313
# The extra values given here take precedence over values defined on the client or passed to this method.
305314
extra_headers: Headers | None = None,
@@ -329,6 +338,8 @@ async def create(
329338
330339
parent_id: ID of the parent span if this is a child span in a trace
331340
341+
task_id: ID of the task this span belongs to
342+
332343
extra_headers: Send extra headers
333344
334345
extra_query: Add additional query parameters to the request
@@ -350,6 +361,7 @@ async def create(
350361
"input": input,
351362
"output": output,
352363
"parent_id": parent_id,
364+
"task_id": task_id,
353365
},
354366
span_create_params.SpanCreateParams,
355367
),
@@ -403,6 +415,7 @@ async def update(
403415
output: Union[Dict[str, object], Iterable[Dict[str, object]], None] | Omit = omit,
404416
parent_id: Optional[str] | Omit = omit,
405417
start_time: Union[str, datetime, None] | Omit = omit,
418+
task_id: Optional[str] | Omit = omit,
406419
trace_id: Optional[str] | Omit = omit,
407420
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
408421
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -429,6 +442,8 @@ async def update(
429442
430443
start_time: The time the span started
431444
445+
task_id: ID of the task this span belongs to
446+
432447
trace_id: Unique identifier for the trace this span belongs to
433448
434449
extra_headers: Send extra headers
@@ -452,6 +467,7 @@ async def update(
452467
"output": output,
453468
"parent_id": parent_id,
454469
"start_time": start_time,
470+
"task_id": task_id,
455471
"trace_id": trace_id,
456472
},
457473
span_update_params.SpanUpdateParams,

src/agentex/types/span.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ class Span(BaseModel):
3434

3535
parent_id: Optional[str] = None
3636
"""ID of the parent span if this is a child span in a trace"""
37+
38+
task_id: Optional[str] = None
39+
"""ID of the task this span belongs to"""

src/agentex/types/span_create_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ class SpanCreateParams(TypedDict, total=False):
3838

3939
parent_id: Optional[str]
4040
"""ID of the parent span if this is a child span in a trace"""
41+
42+
task_id: Optional[str]
43+
"""ID of the task this span belongs to"""

src/agentex/types/span_update_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,8 @@ class SpanUpdateParams(TypedDict, total=False):
3333
start_time: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
3434
"""The time the span started"""
3535

36+
task_id: Optional[str]
37+
"""ID of the task this span belongs to"""
38+
3639
trace_id: Optional[str]
3740
"""Unique identifier for the trace this span belongs to"""

tests/api_resources/test_spans.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def test_method_create_with_all_params(self, client: Agentex) -> None:
4242
input={"foo": "bar"},
4343
output={"foo": "bar"},
4444
parent_id="parent_id",
45+
task_id="task_id",
4546
)
4647
assert_matches_type(Span, span, path=["response"])
4748

@@ -137,6 +138,7 @@ def test_method_update_with_all_params(self, client: Agentex) -> None:
137138
output={"foo": "bar"},
138139
parent_id="parent_id",
139140
start_time=parse_datetime("2019-12-27T18:11:19.117Z"),
141+
task_id="task_id",
140142
trace_id="trace_id",
141143
)
142144
assert_matches_type(Span, span, path=["response"])
@@ -244,6 +246,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncAgentex) -
244246
input={"foo": "bar"},
245247
output={"foo": "bar"},
246248
parent_id="parent_id",
249+
task_id="task_id",
247250
)
248251
assert_matches_type(Span, span, path=["response"])
249252

@@ -339,6 +342,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncAgentex) -
339342
output={"foo": "bar"},
340343
parent_id="parent_id",
341344
start_time=parse_datetime("2019-12-27T18:11:19.117Z"),
345+
task_id="task_id",
342346
trace_id="trace_id",
343347
)
344348
assert_matches_type(Span, span, path=["response"])

0 commit comments

Comments
 (0)