OpenAIConfigKeys

org.llm4s.config.OpenAIConfigKeys

Environment-variable names recognised by llm4s-openai: OpenAI, Requesty, Azure OpenAI and OpenAI embeddings.

These were ConfigKeys.OPENAI_*, ConfigKeys.REQUESTY_BASE_URL and ConfigKeys.AZURE_* in llm4s-core until the providers moved to their own module (#1132): a key belongs with the code that reads it, so that ConfigKeys does not name variables for a provider that may not be on the classpath. ConfigKeys.OPENROUTER_BASE_URL stays in core with OpenRouter, and still names OPENAI_BASE_URL.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete fields

val AZURE_API_BASE: String

Azure OpenAI deployment endpoint URL, e.g. "https://my-resource.openai.azure.com/...".

Azure OpenAI deployment endpoint URL, e.g. "https://my-resource.openai.azure.com/...".

Attributes

val AZURE_API_KEY: String

Azure API key for the deployment.

Azure API key for the deployment.

Attributes

val AZURE_API_VERSION: String

Azure OpenAI API version string, e.g. "2025-01-01-preview".

Azure OpenAI API version string, e.g. "2025-01-01-preview".

Attributes

val OPENAI_API_KEY: String

OpenAI API key (sk-...). Also used for embeddings when no separate embedding key is set.

OpenAI API key (sk-...). Also used for embeddings when no separate embedding key is set.

Attributes

val OPENAI_BASE_URL: String

Overrides the OpenAI API base URL.

Overrides the OpenAI API base URL.

Defaults to "https://api.openai.com/v1". Set to an OpenRouter URL (containing "openrouter.ai") to route through OpenRouter without a separate config type - the same org.llm4s.llmconnect.config.OpenAIConfig is reused and the client detects OpenRouter from this URL.

Attributes

Overrides the base URL used for OpenAI embedding requests.

Overrides the base URL used for OpenAI embedding requests.

Useful when routing embeddings through a proxy or compatible endpoint independently of the LLM base URL.

Attributes

Selects the OpenAI embedding model when using the legacy provider format.

Selects the OpenAI embedding model when using the legacy provider format.

Attributes

val OPENAI_ORG: String

Optional OpenAI organisation ID forwarded in the OpenAI-Organization header.

Optional OpenAI organisation ID forwarded in the OpenAI-Organization header.

Attributes

val REQUESTY_BASE_URL: String

Requesty base URL alias.

Requesty base URL alias.

Requesty is an OpenAI-compatible gateway and uses the same OPENAI_BASE_URL variable - there is no separate REQUESTY_BASE_URL. Point OPENAI_BASE_URL at the Requesty router endpoint and configure a named provider with provider = "requesty".

Attributes