mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-02 22:17:14 +00:00
feat(api): add Azure Foundry preset
Add Microsoft Azure AI Foundry as a provider preset for `ccs api create`. Usage: `ccs api create --preset foundry` This is a cleaner implementation than the postinstall-based approach, leveraging the existing preset system. Co-authored-by: MinhOmega <49482201+MinhOmega@users.noreply.github.com>
This commit is contained in:
@@ -95,9 +95,12 @@ The dashboard provides visual management for all account types:
|
|||||||
| **OpenRouter** | API Key | `ccs openrouter` | 300+ models, unified API |
|
| **OpenRouter** | API Key | `ccs openrouter` | 300+ models, unified API |
|
||||||
| **GLM** | API Key | `ccs glm` | Cost-optimized execution |
|
| **GLM** | API Key | `ccs glm` | Cost-optimized execution |
|
||||||
| **Kimi** | API Key | `ccs kimi` | Long-context, thinking mode |
|
| **Kimi** | API Key | `ccs kimi` | Long-context, thinking mode |
|
||||||
|
| **Azure Foundry** | API Key | `ccs foundry` | Claude via Microsoft Azure |
|
||||||
|
|
||||||
**OpenRouter Integration** (v7.0.0): CCS v7.0.0 adds OpenRouter with interactive model picker, dynamic discovery, and tier mapping (opus/sonnet/haiku). Create via `ccs api create --preset openrouter` or dashboard.
|
**OpenRouter Integration** (v7.0.0): CCS v7.0.0 adds OpenRouter with interactive model picker, dynamic discovery, and tier mapping (opus/sonnet/haiku). Create via `ccs api create --preset openrouter` or dashboard.
|
||||||
|
|
||||||
|
**Azure Foundry**: Use `ccs api create --preset foundry` to set up Claude via Microsoft Azure AI Foundry. Requires Azure resource and API key from [ai.azure.com](https://ai.azure.com).
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
> **OAuth providers** authenticate via browser on first run. Tokens are cached in `~/.ccs/cliproxy/auth/`.
|
> **OAuth providers** authenticate via browser on first run. Tokens are cached in `~/.ccs/cliproxy/auth/`.
|
||||||
|
|||||||
@@ -87,6 +87,17 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [
|
|||||||
category: 'alternative',
|
category: 'alternative',
|
||||||
alwaysThinkingEnabled: true,
|
alwaysThinkingEnabled: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'foundry',
|
||||||
|
name: 'Azure Foundry',
|
||||||
|
description: 'Claude via Microsoft Azure AI Foundry',
|
||||||
|
baseUrl: 'https://<your-resource>.services.ai.azure.com/api/anthropic',
|
||||||
|
defaultProfileName: 'foundry',
|
||||||
|
defaultModel: 'claude-sonnet-4-5',
|
||||||
|
apiKeyPlaceholder: 'YOUR_AZURE_API_KEY',
|
||||||
|
apiKeyHint: 'Create resource at ai.azure.com, get API key from Keys tab',
|
||||||
|
category: 'alternative',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
/** Get preset by ID */
|
/** Get preset by ID */
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ async function showHelp(): Promise<void> {
|
|||||||
console.log('');
|
console.log('');
|
||||||
console.log(subheader('Options'));
|
console.log(subheader('Options'));
|
||||||
console.log(
|
console.log(
|
||||||
` ${color('--preset <id>', 'command')} Use provider preset (openrouter, glm, glmt, kimi)`
|
` ${color('--preset <id>', 'command')} Use provider preset (openrouter, glm, glmt, kimi, foundry)`
|
||||||
);
|
);
|
||||||
console.log(` ${color('--base-url <url>', 'command')} API base URL (create)`);
|
console.log(` ${color('--base-url <url>', 'command')} API base URL (create)`);
|
||||||
console.log(` ${color('--api-key <key>', 'command')} API key (create)`);
|
console.log(` ${color('--api-key <key>', 'command')} API key (create)`);
|
||||||
@@ -441,6 +441,7 @@ async function showHelp(): Promise<void> {
|
|||||||
console.log(` ${color('glm', 'command')} GLM - Claude via Z.AI (GitHub Copilot)`);
|
console.log(` ${color('glm', 'command')} GLM - Claude via Z.AI (GitHub Copilot)`);
|
||||||
console.log(` ${color('glmt', 'command')} GLMT - GLM with Thinking mode`);
|
console.log(` ${color('glmt', 'command')} GLMT - GLM with Thinking mode`);
|
||||||
console.log(` ${color('kimi', 'command')} Kimi - Moonshot AI reasoning model`);
|
console.log(` ${color('kimi', 'command')} Kimi - Moonshot AI reasoning model`);
|
||||||
|
console.log(` ${color('foundry', 'command')} Azure Foundry - Claude via Microsoft Azure`);
|
||||||
console.log('');
|
console.log('');
|
||||||
console.log(subheader('Examples'));
|
console.log(subheader('Examples'));
|
||||||
console.log(` ${dim('# Interactive wizard')}`);
|
console.log(` ${dim('# Interactive wizard')}`);
|
||||||
|
|||||||
@@ -80,6 +80,19 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [
|
|||||||
apiKeyHint: 'Get your API key from Moonshot AI',
|
apiKeyHint: 'Get your API key from Moonshot AI',
|
||||||
category: 'alternative',
|
category: 'alternative',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'foundry',
|
||||||
|
name: 'Azure Foundry',
|
||||||
|
description: 'Claude via Microsoft Azure AI Foundry',
|
||||||
|
baseUrl: 'https://<your-resource>.services.ai.azure.com/api/anthropic',
|
||||||
|
defaultProfileName: 'foundry',
|
||||||
|
badge: 'Azure',
|
||||||
|
defaultModel: 'claude-sonnet-4-5',
|
||||||
|
requiresApiKey: true,
|
||||||
|
apiKeyPlaceholder: 'YOUR_AZURE_API_KEY',
|
||||||
|
apiKeyHint: 'Create resource at ai.azure.com, get API key from Keys tab',
|
||||||
|
category: 'alternative',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
/** Get presets by category */
|
/** Get presets by category */
|
||||||
|
|||||||
Reference in New Issue
Block a user