Skip to content

bug(config): a completed OAuth sign-in can report itself unauthenticated #275

Description

@0xKT

Summary

Each OAuth family decides for itself where its credential lives, and the code that
writes one is not always the code that reads it. A sign-in can complete, store a
valid token, and leave every status surface reporting the provider as
unauthenticated -- permanently, because nothing will look where the token was put.

Three roots are in play: openai_codex writes through oauth_cli_kit's data dir
while LiteLLM's chatgpt driver reads CHATGPT_TOKEN_DIR; github_copilot's
authenticator defaults to ~/.config/litellm/github_copilot; the two MiniMax
families use oauth_cli_kit's auth dir under platformdirs.

The quieter half of the same problem: "the file exists" is treated as "the
credential is usable". A truncated write, a hand-edited file, or an empty one all
pass a path check and then fail on the first request, having already reported the
provider as ready.

Steps to reproduce

  1. Run raven provider login openai-codex and complete the flow.
  2. Run raven provider list.
  3. Run raven tui, type /model, and look at the OpenAI Codex row.

Expected behavior

A provider reports itself authenticated after a sign-in that stored a token, and
"configured" means the credential reads as a credential rather than that a file sits
at the path.

Actual behavior

provider list still says the provider needs raven provider login openai-codex,
and the /model row still shows the same warning. Signing in again does not change
it.

Logs or screenshots

$ raven provider list
openai_codex        (empty)     run `raven provider login openai-codex` to authenticate

Environment

OS: macOS 26.5 (arm64)
Shell: zsh
Python: 3.12.12
Node: v24.14.0
Raven: 3087174 (origin/main)
Install: source checkout, uv sync
litellm: 1.85.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions