[Feature Request] Implement OpenAI OAuth Provider
Feature Request: OpenAI OAuth Provider
Description
Currently, Agent Zero supports authentication with OpenAI via API keys. It would be valuable to also support OpenAI OAuth as an additional authentication provider, giving users one more option to connect to OpenAI services.
Motivation
The main goal is simply to expand the available provider options in Agent Zero. OpenAI offers OAuth-based authentication, and having it as a supported provider would give users more flexibility in how they connect and authenticate with OpenAI's platform.
Expected Behavior
- Users should be able to select OpenAI OAuth as a provider option in Agent Zero's configuration.
- The OAuth flow should handle token acquisition and refresh transparently.
- Existing API key authentication should remain unchanged.
Thank you!
This is likely crucial for individual entrepreneurs and small business users, and perhaps also for the breakthrough success of AgentZero. It would be good to fully exploit those subscriptions.
Do not limit this to OpenAI only. There are other providers as well, such as Anthropic, Kimi, and MiniMax. Some other agentic platforms already support them.
I am already using an OpenAI subscription after making some tweaks.
I am in the same boat and submitted the following feature request Title: Feature Request — Support Claude Code / Anthropic OAuth authentication (not just API keys)
Description:
I use Claude Code (Anthropic's VS Code extension) which authenticates via OAuth session tokens tied to my Claude Pro/MAX subscription. This gives me unlimited access to Claude models through VS Code.
However, Agent Zero only supports raw API keys (sk-ant-api03-...) via LiteLLM, which requires separate API credits purchased at console.anthropic.com. This means I'm paying for a Claude subscription but can't use that same authorization in Agent Zero.
The ask: Could Agent Zero support Anthropic's OAuth-based authentication (the same flow Claude Code uses) as an alternative to API keys? This way, users with Claude Pro/MAX subscriptions could use their existing subscription to power Agent Zero without buying separate API credits.
Technical context:
Claude Code authenticates via OAuth and provides a session token (e.g., gssiWmbu...) This token works with Anthropic's API but uses a different auth flow than the x-api-key header that LiteLLM sends The Anthropic API key in my .env has zero credits, but my Claude subscription is fully active and powers Claude Code right now LiteLLM may already have or could add support for OAuth bearer tokens to the Anthropic provider
OpenClaw et Hermes already offer this OAuth option natively, which encourages more people to use it because using a subscription is cheaper than going through the API.
Furthermore, it's not complicated to integrate since, according to the current LiteLLM documentation, there's a ChatGPT provider called ChatGPT Subscription, with OAuth/device flow authentication...
Closing due to inactivity of 90 days.