feat(ai): add Radius gateway support
This commit is contained in:
@@ -28,21 +28,37 @@ export {
|
||||
refreshOpenAICodexToken,
|
||||
} from "./openai-codex.ts";
|
||||
|
||||
// Radius (pi-messages gateway)
|
||||
export {
|
||||
createRadiusOAuthProvider,
|
||||
DEFAULT_RADIUS_GATEWAY,
|
||||
type RadiusGatewayConfig,
|
||||
type RadiusGatewayModel,
|
||||
type RadiusOAuthCredentials,
|
||||
type RadiusOAuthProviderOptions,
|
||||
} from "./radius.ts";
|
||||
export * from "./types.ts";
|
||||
|
||||
// ============================================================================
|
||||
// Provider Registry
|
||||
// ============================================================================
|
||||
|
||||
import { getProviderEnvValue } from "../provider-env.ts";
|
||||
import { anthropicOAuthProvider } from "./anthropic.ts";
|
||||
import { githubCopilotOAuthProvider } from "./github-copilot.ts";
|
||||
import { openaiCodexOAuthProvider } from "./openai-codex.ts";
|
||||
import { createRadiusOAuthProvider, DEFAULT_RADIUS_GATEWAY } from "./radius.ts";
|
||||
import type { OAuthCredentials, OAuthProviderId, OAuthProviderInfo, OAuthProviderInterface } from "./types.ts";
|
||||
|
||||
const BUILT_IN_OAUTH_PROVIDERS: OAuthProviderInterface[] = [
|
||||
anthropicOAuthProvider,
|
||||
githubCopilotOAuthProvider,
|
||||
openaiCodexOAuthProvider,
|
||||
createRadiusOAuthProvider({
|
||||
id: "radius",
|
||||
name: "Radius",
|
||||
gateway: getProviderEnvValue("PI_GATEWAY") || DEFAULT_RADIUS_GATEWAY,
|
||||
}),
|
||||
];
|
||||
|
||||
const oauthProviderRegistry = new Map<string, OAuthProviderInterface>(
|
||||
|
||||
Reference in New Issue
Block a user