Files
automaker/apps/ui/src/config/model-config.ts
SuperComboGamer 584f5a3426 Merge main into massive-terminal-upgrade
Resolves merge conflicts:
- apps/server/src/routes/terminal/common.ts: Keep randomBytes import, use @automaker/utils for createLogger
- apps/ui/eslint.config.mjs: Use main's explicit globals list with XMLHttpRequest and MediaQueryListEvent additions
- apps/ui/src/components/views/terminal-view.tsx: Keep our terminal improvements (killAllSessions, beforeunload, better error handling)
- apps/ui/src/config/terminal-themes.ts: Keep our search highlight colors for all themes
- apps/ui/src/store/app-store.ts: Keep our terminal settings persistence improvements (merge function)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 20:27:44 -05:00

57 lines
1.3 KiB
TypeScript

/**
* Model Configuration - Centralized model settings for the app
*
* Models can be overridden via environment variables:
* - AUTOMAKER_MODEL_CHAT: Model for chat interactions
* - AUTOMAKER_MODEL_DEFAULT: Fallback model for all operations
*/
// Import shared model constants and types
import { CLAUDE_MODEL_MAP, DEFAULT_MODELS } from '@automaker/types';
import { resolveModelString } from '@automaker/model-resolver';
// Re-export for backward compatibility
export { CLAUDE_MODEL_MAP, DEFAULT_MODELS, resolveModelString };
/**
* Get the model for chat operations
*
* Priority:
* 1. Explicit model parameter
* 2. AUTOMAKER_MODEL_CHAT environment variable
* 3. AUTOMAKER_MODEL_DEFAULT environment variable
* 4. Default chat model
*/
export function getChatModel(explicitModel?: string): string {
if (explicitModel) {
return resolveModelString(explicitModel);
}
const envModel = import.meta.env.AUTOMAKER_MODEL_CHAT || import.meta.env.AUTOMAKER_MODEL_DEFAULT;
if (envModel) {
return resolveModelString(envModel);
}
return DEFAULT_MODELS.claude;
}
/**
* Default allowed tools for chat interactions
*/
export const CHAT_TOOLS = [
'Read',
'Write',
'Edit',
'Glob',
'Grep',
'Bash',
'WebSearch',
'WebFetch',
] as const;
/**
* Default max turns for chat
*/
export const CHAT_MAX_TURNS = 1000;