Skip to content

Commit eb04a75

Browse files
Merge branch 'webb/mistral/chat-complete' into webb/mistral/tokens
2 parents 203b691 + ae22b23 commit eb04a75

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎.github/workflows/test-integrations-ai.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python-version: ["3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.14t"]
20+
python-version: ["3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.14t","3.15","3.15t"]
2121
os: [ubuntu-22.04]
2222
env:
2323
# 3.6/3.7 run in the python:X.Y container; tell uv to use that system Python.
@@ -57,6 +57,10 @@ jobs:
5757
run: |
5858
set -x # print commands that are executed
5959
./scripts/runtox.sh "py${{ matrix.python-version }}-litellm"
60+
- name: Test mistral
61+
run: |
62+
set -x # print commands that are executed
63+
./scripts/runtox.sh "py${{ matrix.python-version }}-mistral"
6064
- name: Test openai-base
6165
run: |
6266
set -x # print commands that are executed

‎sentry_sdk/integrations/mistral.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def wrap_complete(self: "Chat", *args: "Any", **kwargs: "Any") -> "Any":
4444

4545
if has_span_streaming_enabled(client.options):
4646
span = sentry_sdk.traces.start_span(
47-
name=f"chat {model}".strip(),
47+
name=f"chat {model}" if model is not None else "chat",
4848
attributes={
4949
"sentry.op": OP.GEN_AI_CHAT,
5050
"sentry.origin": MistralIntegration.origin,
@@ -109,7 +109,7 @@ async def wrap_complete_async(self: "Chat", *args: "Any", **kwargs: "Any") -> "A
109109

110110
if has_span_streaming_enabled(client.options):
111111
span = sentry_sdk.traces.start_span(
112-
name=f"chat {model}".strip(),
112+
name=f"chat {model}" if model is not None else "chat",
113113
attributes={
114114
"sentry.op": OP.GEN_AI_CHAT,
115115
"sentry.origin": MistralIntegration.origin,

0 commit comments

Comments
 (0)