final case class WatsonXConfig(apiKey: String, projectId: String, spaceId: Option[String], model: String, baseUrl: String, apiVersion: String, iamUrl: String, contextWindow: Int, reserveCompletion: Int) extends ProviderConfig
Configuration for IBM watsonx.ai.
watsonx.ai hosts IBM Granite, Llama, Mistral and other models behind a governed API. Auth is IBM Cloud IAM: the apiKey is exchanged for a short-lived bearer token. Inference runs in a project (projectId) or a deployment space (spaceId); setting both is rejected. Prefer WatsonXConfig.fromValues over the primary constructor.
Value parameters
apiKey
IBM Cloud API key exchanged for IAM bearer tokens; redacted in toString.
apiVersion
watsonx API version date, e.g. "2024-05-31".
baseUrl
watsonx.ai ML API base URL, e.g. "https://us-south.ml.cloud.ibm.com".
contextWindow
Model's total token capacity (prompt + completion combined).
iamUrl
IBM Cloud IAM token endpoint.
model
Model identifier, e.g. "ibm/granite-13b-instruct-v2".
projectId
watsonx project ID; may be empty only when spaceId is set.
reserveCompletion
Tokens held back from prompt history for the completion.
spaceId
Optional watsonx deployment space ID, used in place of the project (never together with it).
The endpoint this config will contact, when it is known statically.
The endpoint this config will contact, when it is known statically.
Used by policy checks and diagnostics that need to know where traffic will go without knowing which provider it belongs to. None means the config carries no single URL — not that it makes no network calls.