Add FirePass provider support for Kimi K2.5 Turbo
- Add new 'firepass' provider type alongside anthropic, openai, openrouter - FirePass uses Fireworks AI's endpoint for Kimi K2.5 Turbo model - Subscription billing model ($7/week) with 256K context window - Anthropic API compatible (uses Anthropic SDK with custom baseURL) Changes: - providers.ts: Add firepass detection and base URL handling - auth.ts: Add FirePass API key management (FIREPASS_API_KEY or FIREWORKS_API_KEY) - config.ts: Add firepassApiKey and firepass auth provider - client.ts: Add firepass client creation with custom baseURL - http.ts: Add firepass auth headers - modelStrings.ts: Return Kimi K2.5 Turbo model ID for firepass - model.ts: Add Kimi display name handling and default model logic - modelOptions.ts: Simplified model picker for firepass (Kimi K2.5 Turbo only) - status.tsx: Display FirePass in status bar - login.tsx: Add FirePass option to provider selection - FirepassLoginFlow.tsx: New component for FirePass login flow Usage: 1. Run /login and select "FirePass" 2. Enter your Fireworks API key 3. Model picker shows Kimi K2.5 Turbo
This commit is contained in:
@@ -11,6 +11,7 @@ import { OAUTH_BETA_HEADER } from '../constants/oauth.js'
|
||||
import {
|
||||
getAnthropicApiKey,
|
||||
getClaudeAIOAuthTokens,
|
||||
getFirepassApiKey,
|
||||
getOpenAIApiKey,
|
||||
getOpenRouterApiKey,
|
||||
handleOAuth401Error,
|
||||
@@ -100,6 +101,22 @@ export function getAuthHeaders(): AuthHeaders {
|
||||
}
|
||||
}
|
||||
|
||||
if (provider === 'firepass') {
|
||||
const apiKey = getFirepassApiKey()
|
||||
if (!apiKey) {
|
||||
return {
|
||||
headers: {},
|
||||
error: 'No FirePass API key available',
|
||||
}
|
||||
}
|
||||
// FirePass uses x-api-key header like Anthropic
|
||||
return {
|
||||
headers: {
|
||||
'x-api-key': apiKey,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
if (isClaudeAISubscriber()) {
|
||||
const oauthTokens = getClaudeAIOAuthTokens()
|
||||
if (!oauthTokens?.accessToken) {
|
||||
|
||||
Reference in New Issue
Block a user