Llm4sOpenAICompatibleModule
Registers llm4s-openai-compatible's providers: the generic openai-compatible provider, for any endpoint speaking the OpenAI /chat/completions API, DeepSeek (deepseek), Z.ai (zai), OpenRouter (openrouter), Mistral (mistral), Cohere (cohere, through its OpenAI-compatibility API) and xAI (xai), each running on OpenAICompatibleClient with its own OpenAICompatibleDialect.
Declared in this module's META-INF/services/org.llm4s.llmconnect.spi.Llm4sProviderModule, so adding the llm4s-openai-compatible dependency is all it takes for ProviderRegistry.default to resolve these ids. Where discovery cannot run - a fat jar whose services files were overwritten rather than merged - register it explicitly:
given ProviderRegistry = ProviderRegistry.ofModules(new Llm4sOpenAICompatibleModule)
A class rather than an object because java.util.ServiceLoader instantiates the class named in the services file through its public no-arg constructor.
Attributes
- Graph
-
- Supertypes