// // AgentModelSupport.swift // Zyquo Agent // // Author: Simon-Pierre Boucher // Mail: contact@spboucher.ai // // The agent-capable subset of the shared Zyquo Cloud catalog, exactly as // documented in docs/PROVIDER-REUSE.md §3: models with live-verified native // function calling, frontier-tier multi-step reasoning, and ≥ ~128K context. // Everything else stays in the picker (same list as Cloud) but is // de-emphasized; models with `capabilities.tools == false` (Perplexity sonar, // Gemma, QVQ, DeepSeek R1 distills…) are hard-excluded — the agent loop // refuses to start with them. // import Foundation enum AgentModelSupport { /// Curated "provider|modelID" keys of the agent-capable subset /// (the 🤖 marks in docs/PROVIDER-REUSE.md §2). static let capableKeys: Set = [ // OpenAI "openai|gpt-5.6-sol", "openai|gpt-5.6-terra", "openai|gpt-5.6-luna", "openai|gpt-5.5", "openai|gpt-5.4", "openai|gpt-5.4-mini", "openai|gpt-5.2", "openai|gpt-5.1", "openai|gpt-5", "openai|gpt-5-mini", "openai|o3", "openai|o4-mini", // Anthropic "anthropic|claude-opus-5", "anthropic|claude-sonnet-5", "anthropic|claude-fable-5", "anthropic|claude-opus-4-8", "anthropic|claude-opus-4-7", "anthropic|claude-opus-4-6", "anthropic|claude-sonnet-4-6", "anthropic|claude-haiku-4-5-20251001", // xAI "xai|grok-4.5", "xai|grok-4.3", "xai|grok-4.20", "xai|grok-4.20-non-reasoning", "xai|grok-code-fast-1", // Mistral "mistral|mistral-medium-latest", "mistral|mistral-large-latest", "mistral|mistral-small-latest", // Google Gemini (compat endpoint) "gemini|gemini-3.6-flash", "gemini|gemini-3.5-flash", "gemini|gemini-3.5-flash-lite", "gemini|gemini-3.1-pro-preview", "gemini|gemini-2.5-pro", "gemini|gemini-2.5-flash", "gemini|gemini-pro-latest", "gemini|gemini-flash-latest", // Alibaba Qwen / DashScope "qwen|qwen3.7-max", "qwen|qwen3.7-plus", "qwen|qwen3.7-flash", "qwen|qwen3.6-plus", "qwen|qwen3.5-plus", "qwen|qwen3-coder-plus", "qwen|qwen3-coder-flash", "qwen|qwen3-coder-next", "qwen|qwen3-coder-480b-a35b-instruct", "qwen|qwen3.5-397b-a17b", "qwen|deepseek-v4-pro", "qwen|glm-5.2", // DeepSeek "deepseek|deepseek-v4-flash", "deepseek|deepseek-v4-pro", // Kimi / Moonshot "kimi|kimi-k3", "kimi|kimi-k2.7-code", "kimi|kimi-k2.7-code-highspeed", "kimi|kimi-k2.6", "kimi|kimi-k2.5", // Together AI "together|moonshotai/Kimi-K3", "together|moonshotai/Kimi-K2.7-Code", "together|deepseek-ai/DeepSeek-V4-Pro", "together|zai-org/GLM-5.2", "together|Qwen/Qwen3.7-Max", "together|openai/gpt-oss-120b", "together|nvidia/nemotron-3-ultra-550b-a55b", "together|MiniMaxAI/MiniMax-M3", // DeepInfra "deepinfra|anthropic/claude-fable-5", "deepinfra|anthropic/claude-opus-5", "deepinfra|anthropic/claude-sonnet-5", "deepinfra|anthropic/claude-opus-4-8", "deepinfra|anthropic/claude-haiku-4-5", "deepinfra|google/gemini-3.1-pro", "deepinfra|google/gemini-3.5-flash", "deepinfra|deepseek-ai/DeepSeek-V4-Pro", "deepinfra|deepseek-ai/DeepSeek-V4-Flash", "deepinfra|moonshotai/Kimi-K2.7-Code", "deepinfra|zai-org/GLM-5.2", "deepinfra|Qwen/Qwen3.7-Max", "deepinfra|Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo", "deepinfra|openai/gpt-oss-120b", "deepinfra|MiniMaxAI/MiniMax-M3", // Cerebras "cerebras|gpt-oss-120b", "cerebras|gemma-4-31b", ] /// Overall default agent model (docs/PROVIDER-REUSE.md §3): /// Claude Sonnet 5 — 1M context, adaptive thinking, best-in-class tool use. static let defaultModelID = "claude-sonnet-5" static let defaultModelProvider = ProviderID.anthropic /// Suggested per-provider agent defaults (bolded 🤖 entries in §2). static let providerDefaults: [ProviderID: String] = [ .openai: "gpt-5.6-terra", .anthropic: "claude-sonnet-5", .xai: "grok-4.5", .mistral: "mistral-medium-latest", .gemini: "gemini-3.6-flash", .qwen: "qwen3.7-max", .deepseek: "deepseek-v4-pro", .kimi: "kimi-k3", .together: "deepseek-ai/DeepSeek-V4-Pro", .deepinfra: "deepseek-ai/DeepSeek-V4-Pro", .cerebras: "gpt-oss-120b", ] /// Recommended top tier, surfaced first in the model chip (§3). static let recommendedKeys: [String] = [ "anthropic|claude-sonnet-5", "anthropic|claude-opus-5", "openai|gpt-5.6-terra", "openai|gpt-5.6-sol", "gemini|gemini-3.6-flash", "xai|grok-4.5", "xai|grok-code-fast-1", "deepseek|deepseek-v4-pro", "kimi|kimi-k3", "kimi|kimi-k2.7-code", "qwen|qwen3.7-max", "mistral|mistral-medium-latest", "cerebras|gpt-oss-120b", ] } extension AIModel { /// Whether this model is suitable for deep agentic, multi-step tool use. /// Built-ins follow the curated subset; user-defined custom models qualify /// whenever they declare tool support. `capabilities.tools == false` is /// always disqualifying (hard exclusion). var agentCapable: Bool { guard capabilities.tools, !isLegacy else { return false } if provider == .custom { return true } return AgentModelSupport.capableKeys.contains("\(provider.rawValue)|\(id)") } }