Launch AI tools without storing API keys
Blog post from Pydantic
The Pydantic Logfire CLI has introduced a new feature called the Logfire Gateway, which allows developers to use AI coding tools without storing API keys on their laptops, thereby minimizing security risks. This feature routes requests through a gateway where provider credentials are securely stored, and only a short-lived OAuth token is held in memory on the developer's machine during a session. The gateway manages provider interactions, enforces usage limits, and logs all requests, preventing excessive costs and enhancing security. Developers can configure routing groups to switch between providers like OpenAI and Google without changing tool configurations locally. The system offers hierarchical limits—organization, project, user, and session—to control expenses and prevent runaway billing, while providing a unified audit trail and cost monitoring through the Logfire platform. This setup aims to mitigate risks associated with storing plaintext API keys on developer machines, which are vulnerable to supply-chain attacks.