Skip to content

fix: pin OpenRouter to Cerebras via provider.only instead of provider.order - #43

Merged
davidgut1982 merged 5 commits into
mainfrom
fix/pin-cerebras-provider
Jun 2, 2026
Merged

fix: pin OpenRouter to Cerebras via provider.only instead of provider.order#43
davidgut1982 merged 5 commits into
mainfrom
fix/pin-cerebras-provider

Conversation

@davidgut1982

@davidgut1982 davidgut1982 commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Problem

gpt-oss-120b was being routed by OpenRouter to non-Cerebras providers because:

  1. DEFAULT_PROVIDER_ORDER = ["Groq", "Together", "Fireworks"] — Cerebras not in the list
  2. OpenRouter request used provider.order (soft preference, falls through to others) instead of provider.only (hard pin, fails rather than routing elsewhere)

Changes

src/lore/extraction/client.py

  • DEFAULT_PROVIDER_ORDER: ["Groq", "Together", "Fireworks"]["Cerebras"]
  • OpenRouter request body: "provider": {"order": [...]}"provider": {"only": [...]} — hard pin, will fail loudly if Cerebras is unavailable rather than silently routing to Groq/Together/Fireworks

DEFAULT_PROVIDER stays "openrouter" — OpenRouter remains the transport. Cerebras is the pinned backend within OpenRouter.

docs/auto-extraction-setup.md

  • Updated to explain provider.only vs provider.order distinction
  • Clarified that provider_order: ["Cerebras"] in config becomes provider.only in the OpenRouter request

Config required

In your lore plugin config (plugins/lore/config.json):

"auto_extract": {
  "provider": "openrouter",
  "model": "gpt-oss-120b",
  "provider_order": ["Cerebras"]
}

This is already set correctly on the running instance.

davidgut1982 and others added 3 commits June 2, 2026 07:27
- Change DEFAULT_PROVIDER from "openrouter" to "cerebras"
- Change DEFAULT_PROVIDER_ORDER from ["Groq", "Together", "Fireworks"] to ["Cerebras"]
- Change OpenRouter provider routing from "order" (soft preference) to "only" (hard pin)
  so requests fail rather than silently falling through to non-Cerebras providers
- Update module docstring to reflect new defaults
…r.only

Revert the DEFAULT_PROVIDER change back to openrouter. Lore extraction uses
OpenRouter as the transport but hard-pins to Cerebras through provider.only
(DEFAULT_PROVIDER_ORDER = ["Cerebras"]). The provider itself stays openrouter.

Docstrings and docs/auto-extraction-setup.md updated to present OpenRouter
(pinned to Cerebras) as the default and Cerebras-direct as the alternative,
while preserving the only-vs-order explanation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@davidgut1982 davidgut1982 changed the title fix: pin gpt-oss-120b to Cerebras, default provider to cerebras fix: pin OpenRouter to Cerebras via provider.only instead of provider.order Jun 2, 2026
davidgut1982 and others added 2 commits June 2, 2026 14:44
The OpenRouter request body now uses provider.only (hard-pin semantics)
instead of provider.order, and the provider list changed from
["Groq", "Together", "Fireworks"] to ["Cerebras"]. Update both
test_provider_order_in_request_body and test_openrouter_still_has_provider_routing
to match the new key and value.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- __aexit__(self, *exc) -> *_ (exc tuple never accessed)
- _factory(*args, **kwargs) -> *_args, **_kwargs (mock stub ignores params)
@davidgut1982
davidgut1982 merged commit 2ca3341 into main Jun 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant