Skip to content

feat(plugin): native Fireworks AI login - #46223

Open
Darren-A11att wants to merge 1 commit into
anomalyco:devfrom
Darren-A11att:fireworks-native-auth
Open

feat(plugin): native Fireworks AI login#46223
Darren-A11att wants to merge 1 commit into
anomalyco:devfrom
Darren-A11att:fireworks-native-auth

Conversation

@Darren-A11att

Copy link
Copy Markdown

Issue for this PR

Closes #46222

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a built-in auth plugin for fireworks-ai so auth login and /connect offer "Log in with Fireworks Connect": browser sign-in (PKCE + localhost callback against the Fireworks SSO), then automatic API-key minting via the Fireworks gateway, stored as a native credential. An API-key paste method remains as fallback. Protocol matches Fireworks' open-source fireconnect CLI (MIT).

Two files changed (plugin/index.ts registration, providers.ts priority), one new plugin file, one new test file.

How did you verify your code works?

  • 23 unit tests covering the URL/PKCE/protobuf/gRPC-web helpers and the full sign-in flow with injected fetch (multi-account, access_denied, state mismatch, timeout paths). Plugin suite: 216 pass.
  • Ran the real flow end-to-end on my machine: browser sign-in minted a key, auth list shows Fireworks AI connected, and opencode run --model fireworks-ai/accounts/fireworks/models/glm-5p3 completed successfully.
  • bun typecheck shows only 2 pre-existing errors in packages/core on Bun 1.4, unrelated to this change.

Screenshots / recordings

No UI changes beyond a new auth-method entry in the existing connect dialog.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Adds a built-in auth plugin for the fireworks-ai provider so
opencode auth login (CLI) and /connect (TUI) offer a browser-based
'Log in with Fireworks Connect' flow: PKCE localhost-callback sign-in
against the Fireworks SSO, then gateway key minting, stored as a native
credential. An API-key paste method remains as fallback.

The sign-in protocol is ported from the MIT-licensed fw-ai/fireconnect
CLI (Cognito PKCE flow + gRPC-web gateway calls).

Includes 23 unit tests covering the helpers and the full flow with
dependency-injected fetch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Native Fireworks AI login (browser OAuth) in auth login / /connect

2 participants