agent-zero icon indicating copy to clipboard operation
agent-zero copied to clipboard

[Feature Request] Implement OpenAI OAuth Provider

Open casquijo opened this issue 8 months ago • 5 comments

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!

casquijo avatar Mar 19 '26 13:03 casquijo

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.

akosblazsik avatar Mar 19 '26 14:03 akosblazsik

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.

ch0udry avatar Mar 21 '26 22:03 ch0udry

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

sallytechservepro-cloud avatar Mar 22 '26 12:03 sallytechservepro-cloud

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...

Doud-FR avatar Apr 26 '26 12:04 Doud-FR

Closing due to inactivity of 90 days.

github-actions[bot] avatar Jul 26 '26 04:07 github-actions[bot]