feat: add Moonshot AI (Kimi) provider and update xAI Grok models (#1953)
- Add comprehensive Moonshot AI provider with 11 models including: * Legacy moonshot-v1 series (8k, 32k, 128k context) * Latest Kimi K2 models (K2 Preview, Turbo, Thinking) * Vision-enabled models for multimodal capabilities * Auto-selecting model variants - Update xAI provider with latest Grok models: * Add Grok 4 (256K context) and Grok 4 (07-09) variant * Add Grok 3 Mini Beta and Mini Fast Beta variants * Update context limits to match actual model capabilities * Remove outdated grok-beta and grok-2-1212 models - Add MOONSHOT_API_KEY to environment configuration - Register Moonshot provider in service status monitoring - Full OpenAI-compatible API integration via api.moonshot.ai - Fix TypeScript errors in GitHub provider 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -15,23 +15,23 @@ export default class GoogleProvider extends BaseProvider {
|
||||
staticModels: ModelInfo[] = [
|
||||
/*
|
||||
* Essential fallback models - only the most reliable/stable ones
|
||||
* Gemini 1.5 Pro: 2M context, excellent for complex reasoning and large codebases
|
||||
* Gemini 1.5 Pro: 2M context, 8K output limit (verified from API docs)
|
||||
*/
|
||||
{
|
||||
name: 'gemini-1.5-pro',
|
||||
label: 'Gemini 1.5 Pro',
|
||||
provider: 'Google',
|
||||
maxTokenAllowed: 2000000,
|
||||
maxCompletionTokens: 32768,
|
||||
maxCompletionTokens: 8192,
|
||||
},
|
||||
|
||||
// Gemini 1.5 Flash: 1M context, fast and cost-effective
|
||||
// Gemini 1.5 Flash: 1M context, 8K output limit, fast and cost-effective
|
||||
{
|
||||
name: 'gemini-1.5-flash',
|
||||
label: 'Gemini 1.5 Flash',
|
||||
provider: 'Google',
|
||||
maxTokenAllowed: 1000000,
|
||||
maxCompletionTokens: 32768,
|
||||
maxCompletionTokens: 8192,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -102,10 +102,10 @@ export default class GoogleProvider extends BaseProvider {
|
||||
const finalContext = Math.min(contextWindow, maxAllowed);
|
||||
|
||||
// Get completion token limit from Google API
|
||||
let completionTokens = 32768; // default fallback
|
||||
let completionTokens = 8192; // default fallback (Gemini 1.5 standard limit)
|
||||
|
||||
if (m.outputTokenLimit && m.outputTokenLimit > 0) {
|
||||
completionTokens = Math.min(m.outputTokenLimit, 128000); // Cap at reasonable limit
|
||||
completionTokens = Math.min(m.outputTokenLimit, 128000); // Use API value, cap at reasonable limit
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user