Extends the #215 abstraction so you can use OpenAI, xAI, and Ollama and configure several at once.
OpenAICompatibleLLMProvider / OpenAICompatibleEmbeddingProvider — one impl (official openai SDK) covers OpenAI, xAI (api.x.ai/v1), Ollama (…:11434/v1), OpenRouter, etc. (differ only by base_url/key/model).
Registry: build_llm_providers() returns every provider whose creds are set → run several concurrently; get_llm_provider(name) selects by name, falling back to DEFAULT_LLM_PROVIDER, then Null.
Per-provider env (ANTHROPIC_*/OPENAI_*/XAI_*/OLLAMA_*) + DEFAULT_LLM_PROVIDER/DEFAULT_EMBEDDING_PROVIDER; documented in .env.example. Defaults keep AI off.
Embeddings now have real backends (OpenAI/Ollama), still separate from the LLM.
Extends the #215 abstraction so you can use **OpenAI, xAI, and Ollama** and **configure several at once**.
- `OpenAICompatibleLLMProvider` / `OpenAICompatibleEmbeddingProvider` — one impl (official `openai` SDK) covers OpenAI, xAI (`api.x.ai/v1`), Ollama (`…:11434/v1`), OpenRouter, etc. (differ only by base_url/key/model).
- **Registry**: `build_llm_providers()` returns every provider whose creds are set → run several concurrently; `get_llm_provider(name)` selects by name, falling back to `DEFAULT_LLM_PROVIDER`, then Null.
- Per-provider env (`ANTHROPIC_*`/`OPENAI_*`/`XAI_*`/`OLLAMA_*`) + `DEFAULT_LLM_PROVIDER`/`DEFAULT_EMBEDDING_PROVIDER`; documented in `.env.example`. Defaults keep AI off.
- Embeddings now have real backends (OpenAI/Ollama), still separate from the LLM.
Tests: multi-provider selection, default resolution, disabled-without-creds, null fail-loud. **87 passed.** Relates to #215.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Extends the #215 abstraction:
- OpenAICompatibleLLMProvider / OpenAICompatibleEmbeddingProvider — one impl (via
the official openai SDK) covers OpenAI, xAI (api.x.ai/v1), Ollama
(…:11434/v1), OpenRouter, etc.; they differ only by base_url, key, and model.
- Registry factory: build_llm_providers() / build_embedding_providers() return
every provider whose credentials are configured, so you can run several
concurrently. get_llm_provider(name)/get_embedding_provider(name) select by
name, falling back to default_*_provider, then Null.
- Per-provider env config (ANTHROPIC_*, OPENAI_*, XAI_*, OLLAMA_*) +
DEFAULT_LLM_PROVIDER / DEFAULT_EMBEDDING_PROVIDER; documented in .env.example.
Defaults keep AI off (empty registry).
Embeddings now have real backends (OpenAI/Ollama), still separate from the LLM
since Anthropic offers no embeddings endpoint. Tests cover multi-provider
selection, default resolution, disabled-without-credentials, and null fail-loud.
Full suite 87 passed.
Relates to #215.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Justin Paul <[email protected]>
justin
merged commit ceafb299d6 into main2026-06-09 18:39:21 -04:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Extends the #215 abstraction so you can use OpenAI, xAI, and Ollama and configure several at once.
OpenAICompatibleLLMProvider/OpenAICompatibleEmbeddingProvider— one impl (officialopenaiSDK) covers OpenAI, xAI (api.x.ai/v1), Ollama (…:11434/v1), OpenRouter, etc. (differ only by base_url/key/model).build_llm_providers()returns every provider whose creds are set → run several concurrently;get_llm_provider(name)selects by name, falling back toDEFAULT_LLM_PROVIDER, then Null.ANTHROPIC_*/OPENAI_*/XAI_*/OLLAMA_*) +DEFAULT_LLM_PROVIDER/DEFAULT_EMBEDDING_PROVIDER; documented in.env.example. Defaults keep AI off.Tests: multi-provider selection, default resolution, disabled-without-creds, null fail-loud. 87 passed. Relates to #215.
🤖 Generated with Claude Code