Skip to content

fix: add CodeLayer firepass provider parity - #1

Merged
K-Mistele merged 9 commits into
mainfrom
migrate-riptide-agentlayer-provider-parity
May 2, 2026
Merged

K-Mistele merged 9 commits into
mainfrom
migrate-riptide-agentlayer-provider-parity

Conversation

@K-Mistele

Copy link
Copy Markdown
Contributor

Summary

  • Add Firepass/Fireworks support to CodeLayer provider resolution, including the Fireworks OpenAI-compatible chat endpoint and default router model.
  • Add Anthropic and Fireworks auth-store fallbacks while preserving environment-variable precedence.
  • Restore single-block assistant/thinking labels in the streaming output renderer for CLI parity.

Verification

  • bun --filter @humanlayer/agentlayer-core typecheck
  • bun --filter @humanlayer/codelayer typecheck
  • bun --bun test --conditions=source agents/codelayer/test/agent.test.ts
  • bun --conditions=source --bun agents/codelayer/src/cli.ts --provider firepass --prompt "Respond with exactly two lines: ok then done"

@github-actions

github-actions Bot commented May 2, 2026 •

Copy link
Copy Markdown

Docs Agent Review

Based on my review of the documentation and the source diff, I've identified several gaps where the docs don't cover new functionality.

Verdict

The documentation has significant gaps regarding:

  1. New firepass provider - The Fireworks AI provider (firepass) is not documented in the multi-model guide
  2. GitHub Copilot provider - Available as a CLI provider but not listed in supported providers
  3. Auth store for API keys - The new ability to store Anthropic and Fireworks API keys in the auth store (with env var fallback) is undocumented
  4. OAuth field aliases - The AuthInfo decoder now accepts access/refresh/expires as aliases - undocumented behavioral change

Recommended Updates

1. Update guides/multi-model.md

Add firepass and copilot to the supported providers table, add their environment variables, and document the auth store fallback:

## Supported Providers

| Provider | Model Examples | Environment Variable |
|----------|---------------|---------------------|
| Anthropic | `claude-sonnet-4-20250514`, `claude-opus-4-20250514` | `ANTHROPIC_API_KEY` |
| OpenAI | `gpt-4o`, `gpt-4-turbo`, `o1-preview` | `OPENAI_API_KEY` |
| Google | `gemini-2.0-flash`, `gemini-1.5-pro` | `GOOGLE_API_KEY` |
| Fireworks (Firepass) | `accounts/fireworks/routers/kimi-k2p5-turbo` | `FIREWORKS_API_KEY` |
| GitHub Copilot | `gpt-5.4` | Via AgentLayer auth store |
| OpenAI Codex | `gpt-5.5` | Via AgentLayer auth store |

Add section on auth store fallback:

## Auth Store API Keys

For Anthropic and Fireworks, you can store API keys in the AgentLayer auth store instead of environment variables:

```ts
import { ensureFileAuthStore } from '@humanlayer/agentlayer-provider-auth'

const authStore = await ensureFileAuthStore()
await authStore.set('anthropic', { kind: 'api', apiKey: 'sk-ant-...' })
await authStore.set('fireworks', { kind: 'api', apiKey: 'fw-...' })

The provider resolution checks environment variables first, then falls back to the auth store.


### 2. Update `packages/openai-codex/index.md`
Document the OAuth field aliases in the auth store section:

```markdown
### OAuth Auth Info Fields

The auth store accepts these fields for OAuth tokens:

| Field | Aliases | Description |
|-------|---------|-------------|
| `accessToken` | `access` | The OAuth access token (required) |
| `refreshToken` | `refresh` | Refresh token for token rotation |
| `expiresAt` | `expires` | Unix timestamp when the token expires |
| `idToken` | — | OpenID Connect ID token |
| `scope` | — | Granted scopes |
| `tokenType` | — | Token type (e.g., `Bearer`) |

Files Worth Updating

File Priority Change Needed
packages/docs/content/guides/multi-model.md High Add Firepass/Copilot providers, document auth store API key fallback
packages/docs/content/packages/openai-codex/index.md Medium Document OAuth field aliases (access/refresh/expires)

The output-renderer.ts changes are internal formatting improvements that don't affect the public API surface documented in concepts/streaming.md, so no update is needed there.


To apply these recommendations, comment: @docs-agent apply

export type ProviderType = 'anthropic' | 'openai' | 'codex' | 'copilot'
export type ProviderType = 'anthropic' | 'openai' | 'codex' | 'copilot' | 'firepass'

const FIREWORKS_MODEL_ID = 'accounts/fireworks/routers/kimi-k2p5-turbo'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIREPASS_MODEL_ID

@K-Mistele

Copy link
Copy Markdown
Contributor Author

@docs-agent apply

@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown

Docs Agent Apply

Applied markdown updates and validated the docs build.

  • packages/docs/content/guides/multi-model.md
  • packages/docs/content/packages/openai-codex/index.md

@K-Mistele
K-Mistele merged commit d2290d0 into main May 2, 2026
2 checks passed
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.

1 participant