Converts user‑provided model identifiers into provider‑specific formats for various LLM services, handling aggregators, Anthropic, DeepSeek, and custom cases.
# Source: https://github.com/mperkins0155/hermes-agent | License: MIT | Copyright 2025 Nous Research # Provided via justclaw.it.com; keep this notice with the code. """Per-provider model name normalization. Different LLM providers expect model identifiers in different formats: - **Aggregators** (OpenRouter, Nous, AI Gateway, Kilo Code) need ``vendor/model`` slugs like ``anthropic/claude-sonnet-4.6``. - **Anthropic** native API expects bare names with dots replaced by hyphens: ``claude-sonnet-4-6``. - **Copilot** expects bare names *with* dots preserved: ``claude-sonnet-4.6``. - **OpenCode Zen** preserves dots for GPT/GLM/Gemini/Kimi/MiniMax-style model IDs, but Claude still uses hyphenated native names like ``claude-sonnet-4-6``. - **OpenCode Go** preserves dots in model names: ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key