We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ModelHTTPError
1 parent 6806a6e commit 7362aeaCopy full SHA for 7362aea
pydantic_ai_slim/pydantic_ai/models/google.py
@@ -396,7 +396,7 @@ async def _generate_content(
396
func = self.client.aio.models.generate_content_stream if stream else self.client.aio.models.generate_content
397
try:
398
return await func(model=self._model_name, contents=contents, config=config) # type: ignore
399
- except errors.APIError as e: # pragma: no cover
+ except errors.APIError as e:
400
if (status_code := e.code) >= 400:
401
raise ModelHTTPError(status_code=status_code, model_name=self._model_name, body=e.details) from e
402
raise # pragma: lax no cover
0 commit comments