Compare commits
1 Commits
main
...
gemini/iss
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92ed1485d0 |
@@ -39,8 +39,14 @@ BACKEND_GROQ = "groq"
|
||||
BACKEND_GROK = "grok"
|
||||
BACKEND_KIMI = "kimi-coding"
|
||||
BACKEND_OPENROUTER = "openrouter"
|
||||
BACKEND_OLLAMA_HERMES3_8B = "ollama-hermes3-8b"
|
||||
BACKEND_OLLAMA_LLAMA3_1_LATEST = "ollama-llama3-1-latest"
|
||||
BACKEND_OLLAMA_QWEN2_5_14B = "ollama-qwen2-5-14b"
|
||||
|
||||
ALL_BACKENDS = [
|
||||
BACKEND_OLLAMA_HERMES3_8B, # Prioritize local Ollama models
|
||||
BACKEND_OLLAMA_LLAMA3_1_LATEST,
|
||||
BACKEND_OLLAMA_QWEN2_5_14B,
|
||||
BACKEND_ANTHROPIC,
|
||||
BACKEND_OPENAI_CODEX,
|
||||
BACKEND_GEMINI,
|
||||
@@ -243,22 +249,28 @@ class TaskClassifier:
|
||||
# Order matters: first is most preferred
|
||||
TASK_BACKEND_MAP: Dict[TaskType, List[str]] = {
|
||||
TaskType.CODE: [
|
||||
BACKEND_OPENAI_CODEX, # Best for code generation
|
||||
BACKEND_ANTHROPIC, # Excellent for code review, complex analysis
|
||||
BACKEND_KIMI, # Long context for large codebases
|
||||
BACKEND_GEMINI, # Good multimodal code understanding
|
||||
BACKEND_GROQ, # Fast for simple code tasks
|
||||
BACKEND_OPENROUTER, # Overflow option
|
||||
BACKEND_GROK, # General knowledge backup
|
||||
BACKEND_OLLAMA_HERMES3_8B, # Local, good for many code tasks
|
||||
BACKEND_OLLAMA_LLAMA3_1_LATEST,
|
||||
BACKEND_OPENAI_CODEX, # Best for code generation
|
||||
BACKEND_ANTHROPIC, # Excellent for code review, complex analysis
|
||||
BACKEND_KIMI, # Long context for large codebases
|
||||
BACKEND_GEMINI, # Good multimodal code understanding
|
||||
BACKEND_GROQ, # Fast for simple code tasks
|
||||
BACKEND_OLLAMA_QWEN2_5_14B,
|
||||
BACKEND_OPENROUTER, # Overflow option
|
||||
BACKEND_GROK, # General knowledge backup
|
||||
],
|
||||
TaskType.REASONING: [
|
||||
BACKEND_ANTHROPIC, # Deep reasoning champion
|
||||
BACKEND_GEMINI, # Strong analytical capabilities
|
||||
BACKEND_KIMI, # Long context for complex reasoning chains
|
||||
BACKEND_GROK, # Broad knowledge for reasoning
|
||||
BACKEND_OPENAI_CODEX, # Structured reasoning
|
||||
BACKEND_OPENROUTER, # Overflow
|
||||
BACKEND_GROQ, # Fast fallback
|
||||
BACKEND_OLLAMA_HERMES3_8B, # Local reasoning
|
||||
BACKEND_OLLAMA_LLAMA3_1_LATEST,
|
||||
BACKEND_ANTHROPIC, # Deep reasoning champion
|
||||
BACKEND_GEMINI, # Strong analytical capabilities
|
||||
BACKEND_KIMI, # Long context for complex reasoning chains
|
||||
BACKEND_GROK, # Broad knowledge for reasoning
|
||||
BACKEND_OPENAI_CODEX, # Structured reasoning
|
||||
BACKEND_OLLAMA_QWEN2_5_14B,
|
||||
BACKEND_OPENROUTER, # Overflow
|
||||
BACKEND_GROQ, # Fast fallback
|
||||
],
|
||||
TaskType.RESEARCH: [
|
||||
BACKEND_GEMINI, # Research and multimodal leader
|
||||
@@ -268,6 +280,9 @@ class TaskClassifier:
|
||||
BACKEND_OPENROUTER, # Broadest model access
|
||||
BACKEND_OPENAI_CODEX, # Structured research
|
||||
BACKEND_GROQ, # Fast triage
|
||||
BACKEND_OLLAMA_HERMES3_8B, # Local for basic research
|
||||
BACKEND_OLLAMA_LLAMA3_1_LATEST,
|
||||
BACKEND_OLLAMA_QWEN2_5_14B,
|
||||
],
|
||||
TaskType.CREATIVE: [
|
||||
BACKEND_GROK, # Creative writing and drafting
|
||||
@@ -277,15 +292,21 @@ class TaskClassifier:
|
||||
BACKEND_KIMI, # Long-form creative
|
||||
BACKEND_OPENROUTER, # Variety of creative models
|
||||
BACKEND_GROQ, # Fast creative ops
|
||||
BACKEND_OLLAMA_HERMES3_8B, # Local for creative drafting
|
||||
BACKEND_OLLAMA_LLAMA3_1_LATEST,
|
||||
BACKEND_OLLAMA_QWEN2_5_14B,
|
||||
],
|
||||
TaskType.FAST_OPS: [
|
||||
BACKEND_GROQ, # 284ms response time champion
|
||||
BACKEND_OPENROUTER, # Fast mini models
|
||||
BACKEND_GEMINI, # Flash models
|
||||
BACKEND_GROK, # Fast for simple queries
|
||||
BACKEND_ANTHROPIC, # If precision needed
|
||||
BACKEND_OPENAI_CODEX, # Structured ops
|
||||
BACKEND_KIMI, # Overflow
|
||||
BACKEND_OLLAMA_HERMES3_8B, # Prioritize local fast ops
|
||||
BACKEND_OLLAMA_LLAMA3_1_LATEST,
|
||||
BACKEND_OLLAMA_QWEN2_5_14B,
|
||||
BACKEND_GROQ, # 284ms response time champion
|
||||
BACKEND_OPENROUTER, # Fast mini models
|
||||
BACKEND_GEMINI, # Flash models
|
||||
BACKEND_GROK, # Fast for simple queries
|
||||
BACKEND_ANTHROPIC, # If precision needed
|
||||
BACKEND_OPENAI_CODEX, # Structured ops
|
||||
BACKEND_KIMI, # Overflow
|
||||
],
|
||||
TaskType.TOOL_USE: [
|
||||
BACKEND_ANTHROPIC, # Excellent tool use capabilities
|
||||
@@ -295,15 +316,21 @@ class TaskClassifier:
|
||||
BACKEND_KIMI, # Long context tool sessions
|
||||
BACKEND_OPENROUTER, # Overflow
|
||||
BACKEND_GROK, # General tool use
|
||||
BACKEND_OLLAMA_HERMES3_8B, # Local tool use
|
||||
BACKEND_OLLAMA_LLAMA3_1_LATEST,
|
||||
BACKEND_OLLAMA_QWEN2_5_14B,
|
||||
],
|
||||
TaskType.UNKNOWN: [
|
||||
BACKEND_ANTHROPIC, # Default to strongest general model
|
||||
BACKEND_GEMINI, # Good all-rounder
|
||||
BACKEND_OPENAI_CODEX, # Structured approach
|
||||
BACKEND_KIMI, # Long context safety
|
||||
BACKEND_GROK, # Broad knowledge
|
||||
BACKEND_GROQ, # Fast fallback
|
||||
BACKEND_OPENROUTER, # Ultimate overflow
|
||||
BACKEND_OLLAMA_HERMES3_8B, # Default to local first
|
||||
BACKEND_OLLAMA_LLAMA3_1_LATEST,
|
||||
BACKEND_ANTHROPIC, # Default to strongest general model
|
||||
BACKEND_GEMINI, # Good all-rounder
|
||||
BACKEND_OPENAI_CODEX, # Structured approach
|
||||
BACKEND_KIMI, # Long context safety
|
||||
BACKEND_GROK, # Broad knowledge
|
||||
BACKEND_GROQ, # Fast fallback
|
||||
BACKEND_OPENROUTER, # Ultimate overflow
|
||||
BACKEND_OLLAMA_QWEN2_5_14B,
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user