Skip to content

Commit 4ba1ea8

Browse files
committed
pr change
1 parent 1351ede commit 4ba1ea8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pydantic_ai_slim/pydantic_ai/models/anthropic.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class AnthropicModelSettings(ModelSettings, total=False):
207207
By default, if previous messages contain a container_id (from a prior response),
208208
it will be reused automatically.
209209
210-
Set to `False` to force a fresh container (ignore any container_id from history).
210+
Set to `False` to force a fresh container (ignore any `container_id` from history).
211211
Set to a dict (e.g. `{'id': 'container_xxx'}`) to explicitly specify a container.
212212
"""
213213

@@ -1272,7 +1272,8 @@ async def _get_event_iterator(self) -> AsyncIterator[ModelResponseStreamEvent]:
12721272
elif isinstance(event, BetaRawMessageDeltaEvent):
12731273
self._usage = _map_usage(event, self._provider_name, self._provider_url, self._model_name, self._usage)
12741274
if raw_finish_reason := event.delta.stop_reason: # pragma: no branch
1275-
self.provider_details = {**(self.provider_details or {}), 'finish_reason': raw_finish_reason}
1275+
self.provider_details = self.provider_details or {}
1276+
self.provider_details['finish_reason'] = raw_finish_reason
12761277
self.finish_reason = _FINISH_REASON_MAP.get(raw_finish_reason)
12771278

12781279
elif isinstance(event, BetaRawContentBlockStopEvent): # pragma: no branch

0 commit comments

Comments
 (0)