Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ ContentForge talks to any OpenAI-compatible `/chat/completions` endpoint. Built-
| OpenAI | `openai` | `gpt-4o-mini` | Bearer | `OPENAI_API_KEY`, `OPENAI_BASE_URL` |
| OpenRouter | `openrouter` | `openai/gpt-4o-mini` | Bearer | `OPENROUTER_API_KEY` |
| Ollama (local) | `ollama` | `llama3.1` | Bearer | `OLLAMA_BASE_URL` |
| Groq | `groq` | `llama-3.3-70b-versatile` | Bearer | `GROQ_API_KEY` |
| DeepSeek | `deepseek` | `deepseek-chat` | Bearer | `DEEPSEEK_API_KEY` |
| Together | `together` | `meta-llama/Llama-3.3-70B-Instruct-Turbo` | Bearer | `TOGETHER_API_KEY` |
| Mistral | `mistral` | `mistral-small-latest` | Bearer | `MISTRAL_API_KEY` |
| Xiaomi MiMo | `mimo` | `mimo-v2.5-pro` | api-key | `MIMO_API_KEY` |

Point `base_url` at any other compatible endpoint (llama.cpp, vLLM, LM Studio, a local proxy) and it just works. The pipeline benefits from models that expose a `reasoning_content` field (used by the Quality Agent's 8-dimension scoring) and strong multilingual output (used by the Translator Agent), but neither is required.
Expand Down
28 changes: 28 additions & 0 deletions src/contentforge/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,34 @@
"env_key": "OLLAMA_API_KEY",
"env_base": "OLLAMA_BASE_URL",
},
"groq": {
"base_url": "https://api.groq.com/openai/v1",
"auth_style": "bearer",
"model": "llama-3.3-70b-versatile",
"env_key": "GROQ_API_KEY",
"env_base": "GROQ_BASE_URL",
},
"deepseek": {
"base_url": "https://api.deepseek.com/v1",
"auth_style": "bearer",
"model": "deepseek-chat",
"env_key": "DEEPSEEK_API_KEY",
"env_base": "DEEPSEEK_BASE_URL",
},
"together": {
"base_url": "https://api.together.xyz/v1",
"auth_style": "bearer",
"model": "meta-llama/Llama-3.3-70B-Instruct-Turbo",
"env_key": "TOGETHER_API_KEY",
"env_base": "TOGETHER_BASE_URL",
},
"mistral": {
"base_url": "https://api.mistral.ai/v1",
"auth_style": "bearer",
"model": "mistral-small-latest",
"env_key": "MISTRAL_API_KEY",
"env_base": "MISTRAL_BASE_URL",
},
}

DEFAULT_PROVIDER = "mimo"
Expand Down
33 changes: 32 additions & 1 deletion tests/unit/test_llm_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@

class TestProviderPresets:
def test_known_providers_present(self):
for provider in ("mimo", "openai", "openrouter", "ollama"):
for provider in (
"mimo",
"openai",
"openrouter",
"ollama",
"groq",
"deepseek",
"together",
"mistral",
):
assert provider in PROVIDER_PRESETS

def test_default_provider_is_mimo(self):
Expand Down Expand Up @@ -43,6 +52,28 @@ def test_unknown_provider_falls_back_to_default(self):
config = LLMConfig(provider="does-not-exist", api_key="x")
assert "xiaomimimo.com" in config.base_url # mimo default

def test_groq_preset(self):
config = LLMConfig(provider="groq", api_key="gsk-test")
assert "api.groq.com" in config.base_url
assert config.auth_style == "bearer"
assert config.model == "llama-3.3-70b-versatile"

def test_deepseek_preset(self):
config = LLMConfig(provider="deepseek", api_key="sk-test")
assert "api.deepseek.com" in config.base_url
assert config.auth_style == "bearer"
assert config.model == "deepseek-chat"

def test_together_preset(self):
config = LLMConfig(provider="together", api_key="tg-test")
assert "api.together.xyz" in config.base_url
assert config.auth_style == "bearer"

def test_mistral_preset(self):
config = LLMConfig(provider="mistral", api_key="ms-test")
assert "api.mistral.ai" in config.base_url
assert config.auth_style == "bearer"

def test_explicit_values_override_preset(self):
config = LLMConfig(
provider="openai",
Expand Down
Loading