org.llm4s.config
Members list
Type members
Classlikes
Configuration data for Brave Search tool.
Configuration data for Brave Search tool.
This configuration is loaded from application.conf at the edge (via Llm4sConfig) and passed to BraveSearchTool.create() when instantiating the tool.
Value parameters
- apiKey
-
The Brave Search API key
- apiUrl
-
The base URL for the Brave Search API (default: https://api.search.brave.com/res/v1)
- count
-
The number of search results to return per request
- safeSearch
-
The safe search level (off, moderate, or strict)
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Canonical environment-variable names recognised by Llm4sConfig.
Canonical environment-variable names recognised by Llm4sConfig.
All LLM4S configuration is read from environment variables (or JVM system properties with the same name). This object centralises the names to avoid typos and make grep-friendly references possible.
== Quick reference ==
- Provider API keys — required for cloud providers; see per-section comments.
TRACING_MODE— optional;langfuse,opentelemetry,console, ornone.EMBEDDING_MODEL— required when using embeddings; formatprovider/model.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ConfigKeys.type
Default values for provider endpoints, API versions, and tracing URLs.
Default values for provider endpoints, API versions, and tracing URLs.
These constants are used as fallbacks by the config loaders when the corresponding environment variables or config keys are not set.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
DefaultConfig.type
A model discovered from a provider's live model-listing endpoint.
A model discovered from a provider's live model-listing endpoint.
Value parameters
- metadata
-
optional key/value pairs of additional model metadata (e.g. display name, token limits)
- name
-
the model identifier as reported by the provider
- provider
-
the
ProviderIdthat owns this model
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Configuration data for DuckDuckGo Search tool.
Configuration data for DuckDuckGo Search tool.
This configuration is loaded from application.conf at the edge (via Llm4sConfig) and passed to DuckDuckGoSearchTool.create() when instantiating the tool.
Value parameters
- apiUrl
-
The base URL for the DuckDuckGo API (default: https://api.duckduckgo.com)
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Configuration data for Exa Search tool.
Configuration data for Exa Search tool.
Value parameters
- apiKey
-
The Exa API key
- apiUrl
-
Base URL (default: https://api.exa.ai)
- maxCharacters
-
Maximum characters for text content
- numResults
-
Number of results to return
- searchType
-
Search type (auto, neural, fast, deep)
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ExaSearchToolConfig.type
Application-edge configuration loader for LLM4S.
Application-edge configuration loader for LLM4S.
Reads all runtime configuration from environment variables and system properties via PureConfig. This is the single authorised entry point for configuration in application and test code — never read sys.env, System.getenv, or ConfigFactory.load() directly.
== Provider setup == Define named providers under llm4s.providers.<name> and optionally set llm4s.providers.provider to choose the default provider. Then call defaultProvider or resolve a named provider directly with provider.
Then call defaultProvider to obtain a org.llm4s.llmconnect.config.ProviderConfig ready for org.llm4s.llmconnect.LLMConnect.getClient. Apps that need multiple configured providers can call provider directly.
== Which providers can be resolved == Every method that reads llm4s.providers takes an implicit org.llm4s.llmconnect.spi.ProviderRegistry, which decides what a provider = "..." entry can resolve to. With none in scope it is ProviderRegistry.default: everything found on the classpath through META-INF/services. Pass one explicitly to restrict or extend that set — Llm4sConfig.defaultProvider()(using ProviderRegistry.of(MyProvider)).
Attributes
- See also
-
org.llm4s.config.ConfigKeys for the full list of recognised environment variable names.
- Example
-
for { registry <- Llm4sConfig.modelRegistryService() cfg <- Llm4sConfig.defaultProvider() client <- LLMConnect.getClient(cfg)(using registry) agent = new Agent(client) state <- agent.run("Hello", ToolRegistry.empty) } yield state - Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Llm4sConfig.type
Loader that builds a org.llm4s.rag.permissions.SearchIndex.PgConfig from a PureConfig pureconfig.ConfigSource.
Loader that builds a org.llm4s.rag.permissions.SearchIndex.PgConfig from a PureConfig pureconfig.ConfigSource.
Reads the llm4s.rag.permissions.pg config tree to obtain PostgreSQL connection details (host, port, database, credentials) and table names used by the RAG permission-aware search index.
Use default to read the ambient environment; Llm4sConfig cannot expose this because SearchIndex lives in llm4s-rag and Llm4sConfig lives in llm4s-core.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Model listers for the providers built into llm4s-core, and the factory behind most of them.
Model listers for the providers built into llm4s-core, and the factory behind most of them.
A provider module outside core supplies its own lister the same way: call openAICompatible if the provider serves the OpenAI /models shape, or implement ProviderModelLister if it does not.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ProviderModelListers.type
Shared model types and configuration data structures for the multi-provider configuration system.
Shared model types and configuration data structures for the multi-provider configuration system.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ProvidersConfigModel.type