Class ProviderModelConfig
java.lang.Object
com.github.copilot.rpc.ProviderModelConfig
A BYOK (Bring Your Own Key) model definition in the multi-provider registry.
References a NamedProviderConfig by provider
and becomes selectable under the provider-qualified id provider/id.
All setter methods return this for method chaining.
Experimental. Multi-provider BYOK configuration is experimental and may change or be removed in future SDK or CLI releases.
Example Usage
var model = new ProviderModelConfig().setId("gpt-x").setProvider("my-openai").setWireModel("gpt-x-2025");
- Since:
- 1.0.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClears the maxContextWindowTokens setting, reverting to the default behavior.Clears the maxOutputTokens setting, reverting to the default behavior.Clears the maxPromptTokens setting, reverting to the default behavior.Gets the per-property model capability overrides.getId()Gets the model identifier.Gets the maximum context window token override.Gets the maximum output token override.Gets the maximum prompt token override.Gets the well-known model ID used to look up agent config and default token limits.getName()Gets the human-readable display name.Gets the name of the provider this model is served by.Gets the model name sent to the provider API for inference.setCapabilities(ModelCapabilitiesOverride capabilities) Sets per-property model capability overrides, deep-merged over runtime defaults.Sets the model identifier, unique within its provider.setMaxContextWindowTokens(int maxContextWindowTokens) Sets the maximum context window tokens override.setMaxOutputTokens(int maxOutputTokens) Sets the maximum output tokens override.setMaxPromptTokens(int maxPromptTokens) Sets the maximum prompt tokens override.setModelId(String modelId) Sets the well-known model ID used to look up agent config and default token limits.Sets the human-readable display name.setProvider(String provider) Sets the name of theNamedProviderConfigthis model is served by.setWireModel(String wireModel) Sets the model name sent to the provider API for inference.
-
Constructor Details
-
ProviderModelConfig
public ProviderModelConfig()
-
-
Method Details
-
getId
-
setId
Sets the model identifier, unique within its provider.Combined with
providerto form the selection idprovider/id.- Parameters:
id- the model id- Returns:
- this config for method chaining
-
getProvider
Gets the name of the provider this model is served by.- Returns:
- the provider name
-
setProvider
Sets the name of theNamedProviderConfigthis model is served by.- Parameters:
provider- the provider name- Returns:
- this config for method chaining
-
getWireModel
Gets the model name sent to the provider API for inference.- Returns:
- the wire model name, or
nullif not set
-
setWireModel
Sets the model name sent to the provider API for inference.Use this when the provider's model name differs from
id.- Parameters:
wireModel- the wire model name- Returns:
- this config for method chaining
-
getModelId
Gets the well-known model ID used to look up agent config and default token limits.- Returns:
- the model ID, or
nullif not set
-
setModelId
Sets the well-known model ID used to look up agent config and default token limits.- Parameters:
modelId- the model ID- Returns:
- this config for method chaining
-
getName
Gets the human-readable display name.- Returns:
- the display name, or
nullif not set
-
setName
Sets the human-readable display name.- Parameters:
name- the display name- Returns:
- this config for method chaining
-
getMaxPromptTokens
Gets the maximum prompt token override.- Returns:
- an
OptionalIntcontaining the max prompt tokens, orOptionalInt.empty()if not set
-
setMaxPromptTokens
Sets the maximum prompt tokens override.- Parameters:
maxPromptTokens- the max prompt tokens- Returns:
- this config for method chaining
-
clearMaxPromptTokens
Clears the maxPromptTokens setting, reverting to the default behavior.- Returns:
- this config for method chaining
-
getMaxContextWindowTokens
Gets the maximum context window token override.- Returns:
- an
OptionalIntcontaining the max context window tokens, orOptionalInt.empty()if not set
-
setMaxContextWindowTokens
Sets the maximum context window tokens override.- Parameters:
maxContextWindowTokens- the max context window tokens- Returns:
- this config for method chaining
-
clearMaxContextWindowTokens
Clears the maxContextWindowTokens setting, reverting to the default behavior.- Returns:
- this config for method chaining
-
getMaxOutputTokens
Gets the maximum output token override.- Returns:
- an
OptionalIntcontaining the max output tokens, orOptionalInt.empty()if not set
-
setMaxOutputTokens
Sets the maximum output tokens override.- Parameters:
maxOutputTokens- the max output tokens- Returns:
- this config for method chaining
-
clearMaxOutputTokens
Clears the maxOutputTokens setting, reverting to the default behavior.- Returns:
- this config for method chaining
-
getCapabilities
Gets the per-property model capability overrides.- Returns:
- the capabilities override, or
nullif not set
-
setCapabilities
Sets per-property model capability overrides, deep-merged over runtime defaults.- Parameters:
capabilities- the capabilities override- Returns:
- this config for method chaining
-