-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
Initial Checks
- I confirm that I'm using the latest version of Pydantic AI
Description
We recently created a service account key with open ai and started using it instead of user account key. However, after few minutes (~15 minutes) we see 401 errors
openai.AuthenticationError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}
We had deployed to production (cloud run in GCP) and had validated that the deployment was funcitoning. During smoke testing, after few minutes, the error occurred. We redeployed and observed similar pattern.
I am wondering if this is an issue similar to #1186
Example Code
Python, Pydantic AI & LLM client version
python - 3.12
Pydantic and llm client - 0.0.43