Skip to content

feat(inference): unified provider router (v0.18.2) - #45

Merged
clawnchdev merged 1 commit into
mainfrom
feat/inference-router
Jun 10, 2026
Merged

feat(inference): unified provider router (v0.18.2)#45
clawnchdev merged 1 commit into
mainfrom
feat/inference-router

Conversation

@clawnchdev

Copy link
Copy Markdown
Owner

Completes the "wire everything" for inference. Adds clawmes/lib/inference.py — one chat_completion() that picks the OpenAI-compatible backend at call time, so tools no longer bind to a single provider.

Changes

  • Selection: CLAWMES_LLM_PROVIDER (venice | opengateway); unset → auto (Venice when VENICE_API_KEY is set, else OpenGateway).
  • Unified error: VeniceError / OpenGatewayError → one InferenceError (.code, .provider).
  • Routed both call sites through it: the /research narrative summary and the /agent --ai intent extractor — and therefore clawmes_info op=research. With Venice configured, those run on Venice.
  • README documents CLAWMES_LLM_PROVIDER.

Gate

4641 passed, 8 skipped; 100% coverage; ruff clean; plugin.yaml byte-identical; tool count unchanged (53). The existing research/agent tests stay green via the router's lazy provider resolution; the two import-failure tests retargeted to the router module.

…v0.18.2)

Adds clawmes/lib/inference.py — a single chat_completion() that selects the
OpenAI-compatible backend at call time, so tools stop hardcoding one provider.

* Selection: CLAWMES_LLM_PROVIDER (venice|opengateway); unset -> auto (Venice
  when VENICE_API_KEY set, else OpenGateway).
* VeniceError / OpenGatewayError normalized to one InferenceError (.code,
  .provider).
* Routed both existing inference call sites through it: /research narrative
  summary and /agent --ai intent extractor (and thus clawmes_info op=research).
  With Venice configured, those now run on Venice.

Gate: 4641 passed, 8 skipped; 100% coverage; ruff check + format clean;
plugin.yaml byte-identical. Tool count unchanged (53).
@clawnchdev
clawnchdev merged commit 5cfffd1 into main Jun 10, 2026
4 checks passed
@clawnchdev
clawnchdev deleted the feat/inference-router branch June 10, 2026 00:10
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