Skip to content

Use Claude Code, Codex, VSCode, Pi, and OpenCode (and 6 other harnesses) for free (1.3B+ free tokens) from your terminal, app, IDE, or phone, and now from the browser with native browser sessions (multi-harness + multi-model) like OpenClaw (voice supported + ToS friendly)

Python

Add Chutes provider (#1402)

Ali Khokhar5823d2537f5c
diff --git a/.env.example b/.env.example
index 35b8491e..d8007fea 100644
--- a/.env.example
+++ b/.env.example
@@ -128,6 +128,10 @@ SILICONFLOW_API_KEY=""
NEBIUS_API_KEY=""
+# Chutes (OpenAI-compatible Chat Completions at llm.chutes.ai/v1)
+CHUTES_API_KEY=""
+
+
# Agnes AI (OpenAI-compatible Chat Completions at apihub.agnes-ai.com/v1)
AGNES_API_KEY=""
@@ -166,7 +170,7 @@ OLLAMA_BASE_URL="http://localhost:11434"
# All Claude model requests are mapped to these models, plain model is fallback
# Format: provider_type/model/name
-# Valid providers: "nvidia_nim" | "openai" | "azure_openai" | "open_router" | "gemini" | "vertex" | "deepseek" | "mistral" | "mistral_codestral" | "opencode_zen" | "opencode_go" | "vercel" | "bedrock" | "huggingface" | "cohere" | "github_models" | "wafer" | "kimi" | "kimi_code" | "minimax" | "cerebras" | "groq" | "xai" | "qwencloud" | "together" | "deepinfra" | "siliconflow" | "nebius" | "agnes" | "zenmux" | "sambanova" | "kilo" | "fireworks" | "novita" | "cloudflare" | "zai" | "ollama_cloud" | "lmstudio" | "llamacpp" | "ollama" | "tokenrouter" | "nararoute"
+# Valid providers: "nvidia_nim" | "openai" | "azure_openai" | "open_router" | "gemini" | "vertex" | "deepseek" | "mistral" | "mistral_codestral" | "opencode_zen" | "opencode_go" | "vercel" | "bedrock" | "huggingface" | "cohere" | "github_models" | "wafer" | "kimi" | "kimi_code" | "minimax" | "cerebras" | "groq" | "xai" | "qwencloud" | "together" | "deepinfra" | "siliconflow" | "nebius" | "chutes" | "agnes" | "zenmux" | "sambanova" | "kilo" | "fireworks" | "novita" | "cloudflare" | "zai" | "ollama_cloud" | "lmstudio" | "llamacpp" | "ollama" | "tokenrouter" | "nararoute"
MODEL_FABLE=
MODEL_OPUS=
MODEL_SONNET=
@@ -213,6 +217,7 @@ FCC_SMOKE_MODEL_TOGETHER=
FCC_SMOKE_MODEL_DEEPINFRA=
FCC_SMOKE_MODEL_SILICONFLOW=
FCC_SMOKE_MODEL_NEBIUS=
+FCC_SMOKE_MODEL_CHUTES=
FCC_SMOKE_MODEL_AGNES=
FCC_SMOKE_MODEL_ZENMUX=
FCC_SMOKE_MODEL_SAMBANOVA=
@@ -244,6 +249,7 @@ TOGETHER_PROXY=""
DEEPINFRA_PROXY=""
SILICONFLOW_PROXY=""
NEBIUS_PROXY=""
+CHUTES_PROXY=""
AGNES_PROXY=""
ZENMUX_PROXY=""
AZURE_OPENAI_PROXY=""
diff --git a/README.md b/README.md
index 21b112dc..d1b7bd9a 100644
--- a/README.md
+++ b/README.md
@@ -162,6 +162,7 @@ fcc-codex exec "hello"
| [DeepInfra](https://deepinfra.com/dash/api_keys) | `DEEPINFRA_API_KEY` | `deepinfra/deepseek-ai/DeepSeek-V4-Flash` |
| [SiliconFlow](https://cloud.siliconflow.com/account/ak) | `SILICONFLOW_API_KEY` | `siliconflow/Qwen/Qwen3-32B` |
| [Nebius Token Factory](https://tokenfactory.nebius.com/project/api-keys) | `NEBIUS_API_KEY` | `nebius/Qwen/Qwen3-30B-A3B` |
+| [Chutes](https://chutes.ai/docs/getting-started/authentication) | `CHUTES_API_KEY` | `chutes/Qwen/Qwen3-32B-TEE` |
| [Agnes AI](https://agnes-ai.com/) | `AGNES_API_KEY` | `agnes/agnes-2.0-flash` |
| [ZenMux](https://zenmux.ai/platform/pay-as-you-go) | `ZENMUX_API_KEY` | `zenmux/deepseek/deepseek-v4-flash-free` |
| [Azure OpenAI](https://learn.microsoft.com/azure/foundry/openai/how-to/chatgpt) | `AZURE_OPENAI_API_KEY` and `AZURE_OPENAI_BASE_URL` | `azure_openai/<deployment-name>` |
diff --git a/pyproject.toml b/pyproject.toml
index b30f95cf..bb12e57a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "free-claude-code"
-version = "4.28.0"
+version = "4.29.0"
description = "Local proxy connecting coding agents to OpenAI-compatible AI providers"
readme = "README.md"
requires-python = ">=3.14.0"
diff --git a/smoke/lib/config.py b/smoke/lib/config.py
index 33ee6e8c..3a83fb04 100644
--- a/smoke/lib/config.py
+++ b/smoke/lib/config.py
@@ -76,6 +76,7 @@ PROVIDER_SMOKE_DEFAULT_MODELS: dict[str, str] = {
"deepinfra": "deepinfra/deepseek-ai/DeepSeek-V4-Flash",
"siliconflow": "siliconflow/Qwen/Qwen3-32B",
"nebius": "nebius/Qwen/Qwen3-30B-A3B",
+ "chutes": "chutes/Qwen/Qwen3-32B-TEE",
"sambanova": "sambanova/Meta-Llama-3.3-70B-Instruct",
"kilo": "kilo/kilo-auto/free",
"cerebras": "cerebras/llama3.1-8b",
diff --git a/src/free_claude_code/config/admin/provider_manifest.py b/src/free_claude_code/config/admin/provider_manifest.py
index 6cbca61a..e207dbcd 100644
--- a/src/free_claude_code/config/admin/provider_manifest.py
+++ b/src/free_claude_code/config/admin/provider_manifest.py
@@ -179,6 +179,13 @@ _PROVIDER_FIELD_OVERRIDES: dict[str, dict[str, Any]] = {
"and tool-capable models."
),
},
+ "CHUTES_API_KEY": {
+ "label": "Chutes API Key",
+ "description": (
+ "Chutes API key for OpenAI-compatible chat, reasoning, and "
+ "tool-capable models."
+ ),
+ },
"SAMBANOVA_API_KEY": {
"label": "SambaNova API Key",
"description": (
diff --git a/src/free_claude_code/config/provider_catalog.py b/src/free_claude_code/config/provider_catalog.py
index f446ad54..b6af6114 100644
--- a/src/free_claude_code/config/provider_catalog.py
+++ b/src/free_claude_code/config/provider_catalog.py
@@ -64,6 +64,8 @@ DEEPINFRA_DEFAULT_BASE = "https://api.deepinfra.com/v1/openai"
SILICONFLOW_DEFAULT_BASE = "https://api.siliconflow.com/v1"
# Nebius Token Factory OpenAI-compatible Chat Completions API.
NEBIUS_DEFAULT_BASE = "https://api.tokenfactory.nebius.com/v1"
+# Chutes OpenAI-compatible Chat Completions API.
+CHUTES_DEFAULT_BASE = "https://llm.chutes.ai/v1"
# TokenRouter OpenAI-compatible Chat Completions gateway.
TOKENROUTER_DEFAULT_BASE = "https://api.tokenrouter.com/v1"
# NaraRoute OpenAI-compatible Chat Completions gateway.
@@ -198,6 +200,15 @@ PROVIDER_CATALOG: dict[str, ProviderDescriptor] = {
default_base_url=NEBIUS_DEFAULT_BASE,
proxy_attr="nebius_proxy",
),
+ "chutes": ProviderDescriptor(
+ provider_id="chutes",
+ display_name="Chutes",
+ credential_env="CHUTES_API_KEY",
+ credential_url="https://chutes.ai/docs/getting-started/authentication",
+ credential_attr="chutes_api_key",
+ default_base_url=CHUTES_DEFAULT_BASE,
+ proxy_attr="chutes_proxy",
+ ),
"agnes": ProviderDescriptor(
provider_id="agnes",
display_name="Agnes AI",
diff --git a/src/free_claude_code/config/settings.py b/src/free_claude_code/config/settings.py
index c47885dc..a65c54e0 100644
--- a/src/free_claude_code/config/settings.py
+++ b/src/free_claude_code/config/settings.py
@@ -149,6 +149,9 @@ class Settings(BaseSettings):
# ==================== Nebius Token Factory (OpenAI-compatible) ====================
nebius_api_key: str = Field(default="", validation_alias="NEBIUS_API_KEY")
+ # ==================== Chutes (OpenAI-compatible) ====================
+ chutes_api_key: str = Field(default="", validation_alias="CHUTES_API_KEY")
+
# ==================== Agnes AI (OpenAI-compatible) ====================
agnes_api_key: str = Field(default="", validation_alias="AGNES_API_KEY")
@@ -214,6 +217,7 @@ class Settings(BaseSettings):
deepinfra_proxy: str = Field(default="", validation_alias="DEEPINFRA_PROXY")
siliconflow_proxy: str = Field(default="", validation_alias="SILICONFLOW_PROXY")
nebius_proxy: str = Field(default="", validation_alias="NEBIUS_PROXY")
+ chutes_proxy: str = Field(default="", validation_alias="CHUTES_PROXY")
agnes_proxy: str = Field(default="", validation_alias="AGNES_PROXY")
zenmux_proxy: str = Field(default="", validation_alias="ZENMUX_PROXY")
azure_openai_proxy: str = Field(default="", validation_alias="AZURE_OPENAI_PROXY")
diff --git a/src/free_claude_code/providers/model_listing.py b/src/free_claude_code/providers/model_listing.py
index 29b0de68..6793467a 100644
--- a/src/free_claude_code/providers/model_listing.py
+++ b/src/free_claude_code/providers/model_listing.py
@@ -42,6 +42,7 @@ def extract_openai_model_infos(
required_path_values: RequiredPathValues = (),
required_null_field: str | None = None,
required_sequence_items: tuple[tuple[str, str], ...] = (),
+ exclude_missing_sequence_fields: bool = False,
tags_field: str | None = None,
thinking_tag: str = "reasoning",
non_thinking_tag: str | None = None,
@@ -91,8 +92,12 @@ def extract_openai_model_infos(
if _field(item, required_null_field) is not None:
included = False
+ missing_sequence_field = False
for field_name, required_item in required_sequence_items:
values = _field(item, field_name)
+ if values is None and exclude_missing_sequence_fields:
+ missing_sequence_field = True
+ continue
if not _is_sequence(values) or any(
not isinstance(value, str) or not value.strip() for value in values
):
@@ -104,6 +109,9 @@ def extract_openai_model_infos(
if required_item not in values:
included = False
+ if missing_sequence_field:
+ continue
+
supports_thinking: bool | None = None
if tags_field is not None:
tags_value = _field(item, tags_field)
diff --git a/src/free_claude_code/providers/openai_chat/profiles.py b/src/free_claude_code/providers/openai_chat/profiles.py
index dd197a4a..3053ae25 100644
--- a/src/free_claude_code/providers/openai_chat/profiles.py
+++ b/src/free_claude_code/providers/openai_chat/profiles.py
@@ -77,6 +77,7 @@ class OpenAIModelListing:
required_path_values: RequiredPathValues = ()
required_null_field: str | None = None
required_sequence_items: tuple[tuple[str, str], ...] = ()
+ exclude_missing_sequence_fields: bool = False
tags_field: str | None = None
thinking_tag: str = "reasoning"
non_thinking_tag: str | None = None
@@ -270,6 +271,24 @@ OPENAI_CHAT_PROFILES: dict[str, OpenAIChatProfile] = {
required_path_values=((("architecture", "modality"), ("text->text",)),),
),
),
+ "chutes": OpenAIChatProfile(
+ _policy(
+ "CHUTES",
+ ReasoningReplayMode.DISABLED,
+ default_max_tokens=ANTHROPIC_DEFAULT_MAX_OUTPUT_TOKENS,
+ ),
+ NO_REASONING,
+ model_listing=OpenAIModelListing(
+ path="/models",
+ required_sequence_items=(
+ ("input_modalities", "text"),
+ ("output_modalities", "text"),
+ ("supported_features", "tools"),
+ ),
+ exclude_missing_sequence_fields=True,
+ tags_field="supported_features",
+ ),
+ ),
"agnes": OpenAIChatProfile(
_policy(
"AGNES",
diff --git a/src/free_claude_code/providers/openai_chat/provider.py b/src/free_claude_code/providers/openai_chat/provider.py
index 02369973..594d9532 100644
--- a/src/free_claude_code/providers/openai_chat/provider.py
+++ b/src/free_claude_code/providers/openai_chat/provider.py
@@ -153,6 +153,7 @@ class OpenAIChatProvider(BaseProvider):
required_path_values=listing.required_path_values,
required_null_field=listing.required_null_field,
required_sequence_items=listing.required_sequence_items,
+ exclude_missing_sequence_fields=listing.exclude_missing_sequence_fields,
tags_field=listing.tags_field,
thinking_tag=listing.thinking_tag,
non_thinking_tag=listing.non_thinking_tag,
diff --git a/tests/contracts/test_provider_catalog_order.py b/tests/contracts/test_provider_catalog_order.py
index c812e36f..7946b0f8 100644
--- a/tests/contracts/test_provider_catalog_order.py
+++ b/tests/contracts/test_provider_catalog_order.py
@@ -16,6 +16,7 @@ _EXPECTED_PROVIDER_ORDER: tuple[str, ...] = (
"deepinfra",
"siliconflow",
"nebius",
+ "chutes",
"agnes",
"zenmux",
"azure_openai",
diff --git a/tests/contracts/test_smoke_config.py b/tests/contracts/test_smoke_config.py
index d566c68a..60760dbd 100644
--- a/tests/contracts/test_smoke_config.py
+++ b/tests/contracts/test_smoke_config.py
@@ -59,6 +59,7 @@ def _settings(**overrides):
"deepinfra_api_key": "",
"siliconflow_api_key": "",
"nebius_api_key": "",
+ "chutes_api_key": "",
"sambanova_api_key": "",
"cerebras_api_key": "",
"ollama_api_key": "",
@@ -259,6 +260,23 @@ def test_nebius_provider_smoke_uses_documented_agent_model(monkeypatch) -> None:
assert models[0].source == "provider_default"
+def test_chutes_provider_smoke_uses_documented_agent_model(monkeypatch) -> None:
+ monkeypatch.delenv("FCC_SMOKE_MODEL_CHUTES", raising=False)
+ config = _smoke_config(
+ settings=_settings(
+ model="ollama/llama3.1",
+ ollama_base_url="",
+ chutes_api_key="chutes-key",
+ )
+ )
+
+ models = config.provider_smoke_models()
+
+ assert [model.provider for model in models] == ["chutes"]
+ assert models[0].full_model == "chutes/Qwen/Qwen3-32B-TEE"
+ assert models[0].source == "provider_default"
+
+
def test_agnes_provider_smoke_uses_documented_model(monkeypatch) -> None:
monkeypatch.delenv("FCC_SMOKE_MODEL_AGNES", raising=False)
config = _smoke_config(
diff --git a/tests/providers/test_chutes.py b/tests/providers/test_chutes.py
new file mode 100644
index 00000000..68796f48
--- /dev/null
+++ b/tests/providers/test_chutes.py
@@ -0,0 +1,248 @@
+"""Tests for the Chutes OpenAI-chat profile and semantic model catalog."""
+
+from unittest.mock import AsyncMock
+
+import httpx
+import pytest
+from openai import AsyncOpenAI
+
+from free_claude_code.application.model_metadata import ProviderModelInfo
+from free_claude_code.config.provider_catalog import CHUTES_DEFAULT_BASE
+from free_claude_code.core.anthropic.models import MessagesRequest
+from free_claude_code.core.reasoning import ReasoningPolicy
+from free_claude_code.providers.base import ProviderConfig
+from free_claude_code.providers.model_listing import ModelListResponseError
+from free_claude_code.providers.openai_chat import OpenAIChatProvider
+from tests.providers.support import (
+ REASONING_OFF,
+ REASONING_ON,
+ immediate_admission,
+ profiled_provider,
+ reasoning_for,
+)
+
+_MODEL = "Qwen/Qwen3-32B-TEE"
+
+
+def chutes_provider() -> OpenAIChatProvider:
+ return profiled_provider(
+ "chutes",
+ ProviderConfig(
+ api_key="test-chutes-key",
+ base_url=CHUTES_DEFAULT_BASE,
+ rate_limit=10,
+ rate_window=60,
+ ),
+ admission=immediate_admission(provider_name="chutes"),
+ )
+
+
+def _catalog_model(
+ model_id: str = _MODEL,
+ *,
+ input_modalities: object = ("text",),
+ output_modalities: object = ("text",),
+ supported_features: object = ("tools", "reasoning"),
+) -> dict[str, object]:
+ return {
+ "id": model_id,
+ "input_modalities": input_modalities,
+ "output_modalities": output_modalities,
+ "supported_features": supported_features,
+ }
+
+
[email protected]("reasoning", [REASONING_OFF, REASONING_ON])
+def test_preserves_upstream_reasoning_default(
+ chutes_provider: OpenAIChatProvider,
+ reasoning: ReasoningPolicy,
+) -> None:
+ request = MessagesRequest.model_validate(
+ {
+ "model": _MODEL,
+ "messages": [{"role": "user", "content": "Hello"}],
+ }
+ )
+
+ body = chutes_provider._build_request_body(request, reasoning=reasoning)
+
+ assert "reasoning_effort" not in body
+ assert "reasoning" not in body
+ assert "extra_body" not in body
+
+
+def test_does_not_replay_reasoning_but_preserves_tool_history(
+ chutes_provider: OpenAIChatProvider,
+) -> None:
+ request = MessagesRequest.model_validate(
+ {
+ "model": _MODEL,
+ "messages": [
+ {"role": "user", "content": "Inspect the file."},
+ {
+ "role": "assistant",
+ "content": [
+ {"type": "thinking", "thinking": "Read it first."},
+ {"type": "text", "text": "I will inspect it."},
+ {
+ "type": "tool_use",
+ "id": "toolu_1",
+ "name": "read_file",
+ "input": {"path": "example.py"},
+ },
+ ],
+ },
+ {
+ "role": "user",
+ "content": [
+ {
+ "type": "tool_result",
+ "tool_use_id": "toolu_1",
+ "content": "print('hello')",
+ }
+ ],
+ },
+ ],
+ }
+ )
+
+ body = chutes_provider._build_request_body(
+ request,
+ reasoning=reasoning_for(request),
+ )
+
+ assistant = body["messages"][1]
+ assert assistant["content"] == "I will inspect it."
+ assert assistant["tool_calls"][0]["id"] == "toolu_1"
+ assert "reasoning_content" not in assistant
+ assert "reasoning" not in assistant
+ assert body["messages"][2] == {
+ "role": "tool",
+ "tool_call_id": "toolu_1",
+ "content": "print('hello')",
+ }
+
+
+async def test_lists_only_semantically_agent_capable_models(
+ chutes_provider: OpenAIChatProvider,
+) -> None:
+ chutes_provider._client.get = AsyncMock(
+ return_value={
+ "data": [
+ _catalog_model(),
+ _catalog_model(
+ "plain-agent",
+ supported_features=("tools",),
+ ),
+ _catalog_model(
+ "image-generator",
+ output_modalities=("image",),
+ ),
+ _catalog_model(
+ "chat-without-tools",
+ supported_features=("reasoning",),
+ ),
+ {"id": "legacy-without-capability-metadata"},
+ ]
+ }
+ )
+
+ model_infos = await chutes_provider.list_model_infos()
+
+ assert model_infos == frozenset(
+ {
+ ProviderModelInfo(_MODEL, supports_thinking=True),
+ ProviderModelInfo("plain-agent"),
+ }
+ )
+
+
+ ("item", "message"),
+ [
+ (_catalog_model(input_modalities="text"), "input_modalities string array"),
+ (
+ _catalog_model(output_modalities=("text", 7)),
+ "output_modalities string array",
+ ),
+ (
+ _catalog_model(supported_features=("tools", "")),
+ "supported_features string array",
+ ),
+ (_catalog_model(""), "include id"),
+ ({"id": "legacy-without-capability-metadata"}, "did not include any model ids"),
+ (
+ _catalog_model("image-only", output_modalities=("image",)),
+ "did not include any model ids",
+ ),
+ ],
+)
+async def test_rejects_malformed_or_unusable_catalog_atomically(
+ chutes_provider: OpenAIChatProvider,
+ item: dict[str, object],
+ message: str,
+) -> None:
+ chutes_provider._client.get = AsyncMock(return_value={"data": [item]})
+
+ with pytest.raises(ModelListResponseError, match=message):
+ await chutes_provider.list_model_infos()
+
+
+ "supported_features",
+ [("tools", 7), "tools"],
+)
+async def test_incomplete_record_cannot_bypass_later_metadata_validation(
+ chutes_provider: OpenAIChatProvider,
+ supported_features: object,
+) -> None:
+ chutes_provider._client.get = AsyncMock(
+ return_value={
+ "data": [
+ _catalog_model(),
+ {
+ "id": "incomplete-malformed-model",
+ "output_modalities": ["text"],
+ "supported_features": supported_features,
+ },
+ ]
+ }
+ )
+
+ with pytest.raises(
+ ModelListResponseError,
+ match="supported_features string array",
+ ):
+ await chutes_provider.list_model_infos()
+
+
+async def test_model_catalog_uses_documented_url_and_bearer_auth(
+ chutes_provider: OpenAIChatProvider,
+) -> None:
+ requests: list[httpx.Request] = []
+
+ def handler(request: httpx.Request) -> httpx.Response:
+ requests.append(request)
+ return httpx.Response(200, json={"data": [_catalog_model()]})
+
+ await chutes_provider._client.close()
+ chutes_provider._client = AsyncOpenAI(
+ api_key="wire-chutes-key",
+ base_url=CHUTES_DEFAULT_BASE,
+ max_retries=0,
+ http_client=httpx.AsyncClient(transport=httpx.MockTransport(handler)),
+ )
+ try:
+ model_infos = await chutes_provider.list_model_infos()
+ finally:
+ await chutes_provider.cleanup()
+
+ assert model_infos == frozenset({ProviderModelInfo(_MODEL, supports_thinking=True)})
+ assert len(requests) == 1
+ assert str(requests[0].url) == "https://llm.chutes.ai/v1/models"
+ assert requests[0].headers["authorization"] == "Bearer wire-chutes-key"
diff --git a/tests/providers/test_provider_runtime.py b/tests/providers/test_provider_runtime.py
index e336b8e0..11b3b75e 100644
--- a/tests/providers/test_provider_runtime.py
+++ b/tests/providers/test_provider_runtime.py
@@ -13,6 +13,7 @@ from free_claude_code.config.nim import NimSettings
from free_claude_code.config.provider_catalog import (
AGNES_DEFAULT_BASE,
BEDROCK_DEFAULT_BASE,
+ CHUTES_DEFAULT_BASE,
COHERE_DEFAULT_BASE,
DEEPINFRA_DEFAULT_BASE,
GITHUB_MODELS_DEFAULT_BASE,
@@ -74,6 +75,7 @@ def _make_settings(**overrides):
mock.deepinfra_api_key = "test_deepinfra_key"
mock.siliconflow_api_key = "test_siliconflow_key"
mock.nebius_api_key = "test_nebius_key"
+ mock.chutes_api_key = "test_chutes_key"
mock.mistral_api_key = "test_mistral_key"
mock.codestral_api_key = "test_codestral_key"
mock.deepseek_api_key = "test_deepseek_key"
@@ -147,6 +149,7 @@ def _make_settings(**overrides):
mock.deepinfra_proxy = ""
mock.siliconflow_proxy = ""
mock.nebius_proxy = ""
+ mock.chutes_proxy = ""
mock.azure_openai_proxy = ""
mock.provider_rate_limit = 40
mock.provider_rate_window = 60
@@ -335,6 +338,29 @@ def test_nebius_provider_config_uses_key_base_and_proxy() -> None:
assert isinstance(provider, OpenAIChatProvider)
+def test_chutes_provider_config_uses_key_base_and_proxy() -> None:
+ descriptor = PROVIDER_CATALOG["chutes"]
+ settings = _make_settings(
+ chutes_api_key="chutes-token",
+ chutes_proxy="http://proxy.test:8080",
+ )
+
+ config = build_provider_config(descriptor, settings)
+ with patch("free_claude_code.providers.openai_chat.provider.AsyncOpenAI"):
+ provider = create_provider("chutes", settings)
+
+ assert descriptor.display_name == "Chutes"
+ assert descriptor.credential_env == "CHUTES_API_KEY"
+ assert descriptor.credential_url == (
+ "https://chutes.ai/docs/getting-started/authentication"
+ )
+ assert descriptor.base_url_attr is None
+ assert config.api_key == "chutes-token"
+ assert config.base_url == CHUTES_DEFAULT_BASE
+ assert config.proxy == "http://proxy.test:8080"
+ assert isinstance(provider, OpenAIChatProvider)
+
+
def test_agnes_provider_config_uses_key_base_and_proxy() -> None:
descriptor = PROVIDER_CATALOG["agnes"]
settings = _make_settings(
@@ -672,6 +698,7 @@ def test_create_provider_instantiates_each_builtin():
"deepinfra": OpenAIChatProvider,
"siliconflow": OpenAIChatProvider,
"nebius": OpenAIChatProvider,
+ "chutes": OpenAIChatProvider,
"azure_openai": OpenAIChatProvider,
"open_router": OpenRouterProvider,
"mistral": MistralProvider,
diff --git a/uv.lock b/uv.lock
index c9e6bd41..de37e004 100644
--- a/uv.lock
+++ b/uv.lock
@@ -620,7 +620,7 @@ wheels = [
[[package]]
name = "free-claude-code"
-version = "4.28.0"
+version = "4.29.0"
source = { editable = "." }
dependencies = [
{ name = "aiohttp" },