Files
ccs/src/copilot/types.ts
T
kaitranntt 7653caba71 feat(copilot): add complete model catalog with plan tiers
Add 19 GitHub Copilot supported models with metadata:
- Anthropic: claude-sonnet-4.5, claude-sonnet-4, claude-opus-4.5,
  claude-opus-4.1, claude-haiku-4.5
- OpenAI: gpt-5.2, gpt-5.1-codex-max, gpt-5.1-codex, gpt-5.1-codex-mini,
  gpt-5.1, gpt-5-codex, gpt-5, gpt-5-mini, gpt-4.1
- Google: gemini-3-pro, gemini-3-flash, gemini-2.5-pro
- xAI: grok-code-fast-1
- Fine-tuned: raptor-mini

Each model includes:
- minPlan: free, pro, pro+, business, enterprise
- multiplier: 0 = free tier, 0.25-0.33 = cheap, 1 = standard, 3-10 = premium
- preview: boolean for non-GA models

Update default model to claude-sonnet-4.5 (standard multiplier).
2025-12-18 03:48:47 -05:00

71 lines
1.5 KiB
TypeScript

/**
* Copilot API Types
*
* Type definitions for GitHub Copilot proxy integration.
*/
/**
* Copilot authentication status.
*/
export interface CopilotAuthStatus {
authenticated: boolean;
/** GitHub username if authenticated */
username?: string;
/** Error message if auth check failed */
error?: string;
}
/**
* Copilot daemon status.
*/
export interface CopilotDaemonStatus {
running: boolean;
port: number;
/** Process ID if running */
pid?: number;
/** Version if available */
version?: string;
}
/**
* Combined copilot status.
*/
export interface CopilotStatus {
auth: CopilotAuthStatus;
daemon: CopilotDaemonStatus;
}
/**
* Copilot plan tier for model availability.
* Based on GitHub Copilot plans.
*/
export type CopilotPlanTier = 'free' | 'pro' | 'pro+' | 'business' | 'enterprise';
/**
* Copilot model information.
*/
export interface CopilotModel {
id: string;
name: string;
/** Provider: openai or anthropic */
provider: 'openai' | 'anthropic';
/** Whether this is the default model */
isDefault?: boolean;
/** Minimum plan tier required (free = available to all) */
minPlan?: CopilotPlanTier;
/** Premium request multiplier (0 = free, higher = more expensive) */
multiplier?: number;
/** Whether this model is in preview */
preview?: boolean;
}
/**
* Copilot debug info from `copilot-api debug --json`.
*/
export interface CopilotDebugInfo {
version?: string;
runtime?: string;
authenticated?: boolean;
tokenPath?: string;
}