mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 20:17:45 +00:00
feat(config): add base settings for Kiro and Copilot providers
- Add base-kiro.settings.json with default Kiro models - Add base-copilot.settings.json with default Copilot models - Update config-generator for new provider sections - Extend CLIProxyProvider type with kiro and copilot
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"env": {
|
||||
"ANTHROPIC_BASE_URL": "http://127.0.0.1:8317/api/provider/copilot",
|
||||
"ANTHROPIC_AUTH_TOKEN": "ccs-internal-managed",
|
||||
"ANTHROPIC_MODEL": "gpt-4o",
|
||||
"ANTHROPIC_DEFAULT_OPUS_MODEL": "gpt-4o",
|
||||
"ANTHROPIC_DEFAULT_SONNET_MODEL": "gpt-4o",
|
||||
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "gpt-4o-mini"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"env": {
|
||||
"ANTHROPIC_BASE_URL": "http://127.0.0.1:8317/api/provider/kiro",
|
||||
"ANTHROPIC_AUTH_TOKEN": "ccs-internal-managed",
|
||||
"ANTHROPIC_MODEL": "kiro",
|
||||
"ANTHROPIC_DEFAULT_OPUS_MODEL": "kiro",
|
||||
"ANTHROPIC_DEFAULT_SONNET_MODEL": "kiro",
|
||||
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "kiro"
|
||||
}
|
||||
}
|
||||
@@ -44,8 +44,9 @@ export function getCliproxyWritablePath(): string {
|
||||
* v1: Initial config (port, auth-dir, api-keys only)
|
||||
* v2: Full-featured config with dashboard, quota mgmt, simplified key
|
||||
* v3: Logging disabled by default (user opt-in via ~/.ccs/config.yaml)
|
||||
* v4: Added Kiro (AWS) and GitHub Copilot providers
|
||||
*/
|
||||
export const CLIPROXY_CONFIG_VERSION = 3;
|
||||
export const CLIPROXY_CONFIG_VERSION = 4;
|
||||
|
||||
/** Provider display names (static metadata) */
|
||||
const PROVIDER_DISPLAY_NAMES: Record<CLIProxyProvider, string> = {
|
||||
@@ -54,6 +55,8 @@ const PROVIDER_DISPLAY_NAMES: Record<CLIProxyProvider, string> = {
|
||||
agy: 'Antigravity',
|
||||
qwen: 'Qwen Code',
|
||||
iflow: 'iFlow',
|
||||
kiro: 'Kiro (AWS)',
|
||||
copilot: 'GitHub Copilot',
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,10 +8,11 @@
|
||||
import { PlatformInfo, SupportedOS, SupportedArch, ArchiveExtension } from './types';
|
||||
|
||||
/**
|
||||
* CLIProxyAPI fallback version (used when GitHub API unavailable)
|
||||
* CLIProxyAPIPlus fallback version (used when GitHub API unavailable)
|
||||
* Auto-update fetches latest from GitHub; this is only a safety net
|
||||
* Note: CLIProxyAPIPlus uses v6.6.X-0 suffix pattern
|
||||
*/
|
||||
export const CLIPROXY_FALLBACK_VERSION = '6.5.53';
|
||||
export const CLIPROXY_FALLBACK_VERSION = '6.6.40-0';
|
||||
|
||||
/** @deprecated Use CLIPROXY_FALLBACK_VERSION instead */
|
||||
export const CLIPROXY_VERSION = CLIPROXY_FALLBACK_VERSION;
|
||||
|
||||
@@ -80,7 +80,7 @@ export function saveVariantUnified(
|
||||
if (!config.cliproxy) {
|
||||
config.cliproxy = {
|
||||
oauth_accounts: {},
|
||||
providers: ['gemini', 'codex', 'agy', 'qwen', 'iflow'],
|
||||
providers: ['gemini', 'codex', 'agy', 'qwen', 'iflow', 'kiro', 'copilot'],
|
||||
variants: {},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -114,8 +114,10 @@ export interface DownloadResult {
|
||||
* - agy: Antigravity via OAuth (short name for easy usage)
|
||||
* - qwen: Qwen Code via OAuth (qwen3-coder)
|
||||
* - iflow: iFlow via OAuth
|
||||
* - kiro: Kiro (AWS CodeWhisperer) via OAuth
|
||||
* - copilot: GitHub Copilot via Device Code
|
||||
*/
|
||||
export type CLIProxyProvider = 'gemini' | 'codex' | 'agy' | 'qwen' | 'iflow';
|
||||
export type CLIProxyProvider = 'gemini' | 'codex' | 'agy' | 'qwen' | 'iflow' | 'kiro' | 'copilot';
|
||||
|
||||
/**
|
||||
* CLIProxy config.yaml structure (minimal)
|
||||
|
||||
@@ -58,7 +58,7 @@ export type OAuthAccounts = Record<string, string>;
|
||||
*/
|
||||
export interface CLIProxyVariantConfig {
|
||||
/** Base provider to use */
|
||||
provider: 'gemini' | 'codex' | 'agy' | 'qwen' | 'iflow';
|
||||
provider: 'gemini' | 'codex' | 'agy' | 'qwen' | 'iflow' | 'kiro' | 'copilot';
|
||||
/** Account nickname (references oauth_accounts) */
|
||||
account?: string;
|
||||
/** Path to settings file (e.g., "~/.ccs/gemini-custom.settings.json") */
|
||||
|
||||
Reference in New Issue
Block a user