From 1d143205ea1225284cdf6343bb3bc1e45456cf99 Mon Sep 17 00:00:00 2001 From: Lareb Zafar Date: Sun, 22 Nov 2026 15:40:11 +0530 Subject: [PATCH] Use Sonnet 5.5 as the default Anthropic model Signed-off-by: Lareb Zafar --- .env.example | 2 +- docs/architecture/llm-architecture.md | 3 ++- docs/getting-started/models-and-keys.md | 2 +- docs/operations/deployment.md | 2 +- docs/reference/configuration.md | 2 +- loom.example.yaml | 2 +- schemas/loom-settings.schema.json | 2 +- server/core/llm_provider.py | 6 +++--- server/settings/catalog.py | 2 +- tests/unit/test_llm_provider_inference.py | 10 ++++++++-- 10 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.env.example b/.env.example index 4494f2618d..28ed3b2efe 100644 --- a/.env.example +++ b/.env.example @@ -133,7 +133,7 @@ LOOM_EMBEDDING_MODEL=fake-ngram-3072 LOOM_EMBEDDING_DIM=3072 # LLM: fake, openai or anthropic. Empty (code default) = inferred from the model # name, else from the key present, else fake. Empty model = the provider's -# default (gpt-6-luna / claude-haiku-5-5 / fake-echo-1). +# default (gpt-6-luna / claude-sonnet-5-5 / fake-echo-1). LOOM_LLM_PROVIDER=fake LOOM_LLM_MODEL=fake-echo-1 # Provider keys; each is needed only by the provider that names it. diff --git a/docs/architecture/llm-architecture.md b/docs/architecture/llm-architecture.md index a17faef2a3..756350893e 100644 --- a/docs/architecture/llm-architecture.md +++ b/docs/architecture/llm-architecture.md @@ -179,7 +179,8 @@ low. 2. Else from `LOOM_LLM_MODEL`: `bedrock:*` is `bedrock`; `claude*` is `anthropic`; `gpt*`, `o1*`, `o3*`, `o4*`, `chatgpt*` are `openai`; `fake*` is `fake`. 3. Else from the key present: `OPENAI_API_KEY` gives `openai` with `gpt-6-luna`, then - `ANTHROPIC_API_KEY` gives `anthropic` with `claude-haiku-5-5`. + `ANTHROPIC_API_KEY` gives `anthropic` with `claude-sonnet-5-5`. + An explicit deployment model or per-job model overrides this provider default. 4. Else `fake` (`fake-echo-1`). `Settings` resolves it once at load; `settings.llm_provider` is always concrete, and diff --git a/docs/getting-started/models-and-keys.md b/docs/getting-started/models-and-keys.md index 5a168d2b2d..611aba7cf1 100644 --- a/docs/getting-started/models-and-keys.md +++ b/docs/getting-started/models-and-keys.md @@ -127,7 +127,7 @@ names its providers explicitly (the local embedder and the fake LLM). ```dotenv LOOM_LLM_PROVIDER=anthropic -LOOM_LLM_MODEL=claude-haiku-5-5 +LOOM_LLM_MODEL=claude-sonnet-5-5 ANTHROPIC_API_KEY= LOOM_REQUIRE_REAL_PROVIDERS=true ``` diff --git a/docs/operations/deployment.md b/docs/operations/deployment.md index ef02819317..4d8b4ae0d1 100644 --- a/docs/operations/deployment.md +++ b/docs/operations/deployment.md @@ -669,7 +669,7 @@ conflicts and writes `memory.ask` answers. Both default to fakes that need no ne | ------------------------- | -------------------------------------------------------------- | ------------------------ | | `fake` | nothing; extraction produces nothing | `fake-echo-1` | | `openai` | `OPENAI_API_KEY` | `gpt-6-luna` | -| `anthropic` | `ANTHROPIC_API_KEY` | `claude-haiku-5-5` | +| `anthropic` | `ANTHROPIC_API_KEY` | `claude-sonnet-5-5` | | `local` | a chat-completions server at `LOOM_LOCAL_LLM_BASE_URL`, no key | `qwen2.5:3b` | - **Width.** `LOOM_EMBEDDING_DIM` must equal the model's width. It is fixed when the diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index 6e71bb2db7..ba395aa6b3 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md @@ -1577,7 +1577,7 @@ Models: which model does each job. | Variable | Type | Default | Live | Meaning | | --- | --- | --- | --- | --- | -| `LOOM_LLM_MODEL` | `str` | `''` | | The deployment's LLM: memory extraction, rerank and every job whose own model setting (the other *_model settings) is left "". Empty takes the resolved provider's default model (gpt-6-luna / claude-haiku-5-5 / qwen2.5:3b / fake-echo-1). | +| `LOOM_LLM_MODEL` | `str` | `''` | | The deployment's LLM: memory extraction, rerank and every job whose own model setting (the other *_model settings) is left "". Empty takes the resolved provider's default model (gpt-6-luna / claude-sonnet-5-5 / qwen2.5:3b / fake-echo-1). | | `LOOM_ASSISTANT_MODEL` | `str` | `''` | | The assistant agent's model, which Loom writes into the agent definition at boot. "" = the definition's own (integrations/librechat/agent.yaml), not llm_model. | | `LOOM_ASSISTANT_PROVIDER` | `'' \| 'anthropic' \| 'local'` | `''` | | The LibreChat endpoint the agent runs on: "" = the definition's (anthropic), "local" = LibreChat's local endpoint (a model server the operator runs; needs assistant_model). | | `LOOM_LLM_FALLBACK_MODEL` | `str` | `''` | | Model to answer with when a client's provider is still unavailable after its retries (429 / 5xx / transport / timeout) or rejected the request (400 / 413 / 422). Counted in `loom.llm.fallback`. 401 / 403 / 404 are configuration and never fall back. "" = fail the op. | diff --git a/loom.example.yaml b/loom.example.yaml index e5698872fa..99d1fb48b9 100644 --- a/loom.example.yaml +++ b/loom.example.yaml @@ -268,7 +268,7 @@ settings: # The deployment's LLM: memory extraction, rerank and every job whose own model # setting (the other *_model settings) is left "". Empty takes the resolved provider's - # default model (gpt-6-luna / claude-haiku-5-5 / qwen2.5:3b / fake-echo-1). [restart] + # default model (gpt-6-luna / claude-sonnet-5-5 / qwen2.5:3b / fake-echo-1). [restart] # llm_model: "" # The assistant agent's model, which Loom writes into the agent definition at boot. "" diff --git a/schemas/loom-settings.schema.json b/schemas/loom-settings.schema.json index 796e76268a..fa250f8db6 100644 --- a/schemas/loom-settings.schema.json +++ b/schemas/loom-settings.schema.json @@ -3690,7 +3690,7 @@ "llm_model": { "default": "", "type": "string", - "description": "The deployment's LLM: memory extraction, rerank and every job whose own model setting (the other *_model settings) is left \"\". Empty takes the resolved provider's default model (gpt-6-luna / claude-haiku-5-5 / qwen2.5:3b / fake-echo-1)." + "description": "The deployment's LLM: memory extraction, rerank and every job whose own model setting (the other *_model settings) is left \"\". Empty takes the resolved provider's default model (gpt-6-luna / claude-sonnet-5-5 / qwen2.5:3b / fake-echo-1)." }, "llm_openai_reasoning_effort": { "default": "", diff --git a/server/core/llm_provider.py b/server/core/llm_provider.py index 79ebf38aaf..945bb71a43 100644 --- a/server/core/llm_provider.py +++ b/server/core/llm_provider.py @@ -13,13 +13,13 @@ # The API-key environment variable of each keyed provider. KEY_ENV_BY_PROVIDER = {"openai": "OPENAI_API_KEY", "anthropic": "ANTHROPIC_API_KEY"} -# The model each provider runs when LOOM_LLM_MODEL is unset: the cheapest current -# model of each provider that does the extraction job well. +# The model each provider runs when LOOM_LLM_MODEL is unset. +# Explicit deployment and per-job model selections keep their configured values. DEFAULT_MODEL_BY_PROVIDER = { # Bedrock model access and inference profiles belong to the deployment. "bedrock": "", "openai": "gpt-6-luna", - "anthropic": "claude-haiku-5-5", + "anthropic": "claude-sonnet-5-5", # A server the operator runs (`local`): a 3B model Ollama pulls in about 2 GB. "local": "qwen2.5:3b", "fake": "fake-echo-1", diff --git a/server/settings/catalog.py b/server/settings/catalog.py index aa4b5f6bfd..3b0753d7c4 100644 --- a/server/settings/catalog.py +++ b/server/settings/catalog.py @@ -4099,7 +4099,7 @@ class ModelSettings(BaseModel): # --- defaults --------------------------------------------------------------- # The deployment's LLM: memory extraction, rerank and every job whose own model # setting (the other *_model settings) is left "". Empty takes the resolved - # provider's default model (gpt-6-luna / claude-haiku-5-5 / qwen2.5:3b / fake-echo-1). + # provider's default model (gpt-6-luna / claude-sonnet-5-5 / qwen2.5:3b / fake-echo-1). llm_model: str = "" # The assistant agent's model, which Loom writes into the agent definition at boot. # "" = the definition's own (integrations/librechat/agent.yaml), not llm_model. diff --git a/tests/unit/test_llm_provider_inference.py b/tests/unit/test_llm_provider_inference.py index 4a369f23c4..135bba69a5 100644 --- a/tests/unit/test_llm_provider_inference.py +++ b/tests/unit/test_llm_provider_inference.py @@ -26,7 +26,13 @@ [ # Explicit provider always wins, model defaults per provider. ("openai", "", NONE, ResolvedLLM("openai", "gpt-6-luna", "LOOM_LLM_PROVIDER")), - ("anthropic", "", NONE, ResolvedLLM("anthropic", "claude-haiku-5-5", "LOOM_LLM_PROVIDER")), + ("anthropic", "", NONE, ResolvedLLM("anthropic", "claude-sonnet-5-5", "LOOM_LLM_PROVIDER")), + ( + "anthropic", + "claude-haiku-5-5", + ANTHROPIC, + ResolvedLLM("anthropic", "claude-haiku-5-5", "LOOM_LLM_PROVIDER"), + ), ("fake", "", BOTH, ResolvedLLM("fake", "fake-echo-1", "LOOM_LLM_PROVIDER")), ("fake", "gpt-4o-mini", OPENAI, ResolvedLLM("fake", "gpt-4o-mini", "LOOM_LLM_PROVIDER")), (" OpenAI ", "gpt-5", NONE, ResolvedLLM("openai", "gpt-5", "LOOM_LLM_PROVIDER")), @@ -54,7 +60,7 @@ "", "", ANTHROPIC, - ResolvedLLM("anthropic", "claude-haiku-5-5", "ANTHROPIC_API_KEY is set"), + ResolvedLLM("anthropic", "claude-sonnet-5-5", "ANTHROPIC_API_KEY is set"), ), ("", "", BOTH, ResolvedLLM("openai", "gpt-6-luna", "OPENAI_API_KEY is set")), # Nothing at all: the keyless fake default the dev container relies on.