Skip to content

Web: add Pi-native account login to model settings #732

Open

Description

@testikun

The Web model settings can save API keys, but cannot complete Pi's interactive account login. Users of ChatGPT/Codex, Claude and other native OAuth providers have to leave the Web UI. The requested direction is a simple, consistent settings page with clear account/API-key choices, inline authorization steps and advanced options disclosed only when needed.

Use Pi 0.99.1's existing ModelRuntime.login/logout and AuthInteraction for provider choice, browser authorization, device codes, prompts, cancellation and credential persistence. Web should project bounded ephemeral interaction state only, bind responses to the exact active Session/flow/prompt, redact native authentication errors, and distinguish an already committed credential whose local availability refresh failed. Keep custom endpoint/model editing and the shared settings shell.

Research references: Pi Web's native OAuth interaction and dialog, OpenCode's provider connection dialog, and official Codex authentication guidance. Verify native credential ownership with an isolated real Pi ModelRuntime fixture, Host routes, component behavior, browser login/device flows, responsive appearance and complete repository checks. External account authorization must be reported separately from fixture acceptance.

Implementation and validation are recorded in Web model connections, with the Issue/PR linked in both directions. Draft PR #711 includes Pi-native account login, the Account / Third-party / Custom entry layout, and local provider marks. Product source 2c59d44f passed the complete repository checks and tests plus seven Chrome regressions; real OpenAI/Anthropic entry and cancellation are distinct from unverified external account authorization. Final documentation and the source-backed 30142 preview use 785571e1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions