agents: do not use bridge config vars for models (#22392)

<!--

If you have used AI to produce some or all of this PR, please ensure you
have read our [AI Contribution
guidelines](https://coder.com/docs/about/contributing/AI_CONTRIBUTING)
before submitting.

-->
This commit is contained in:
Kyle Carberry
2026-02-27 12:24:38 -05:00
committed by GitHub
parent 6248520130
commit 0252205374
+9 -6
View File
@@ -3041,13 +3041,16 @@ func chatProviderValidationDetail() string {
func chatProviderAPIKeysFromDeploymentValues(
deploymentValues *codersdk.DeploymentValues,
) chatprovider.ProviderAPIKeys {
_ = deploymentValues
// For now, we'll just manage configs in the UI.
// We should probably not be reusing the AI bridge configs anyways.
return chatprovider.ProviderAPIKeys{
OpenAI: deploymentValues.AI.BridgeConfig.OpenAI.Key.Value(),
Anthropic: deploymentValues.AI.BridgeConfig.Anthropic.Key.Value(),
BaseURLByProvider: map[string]string{
"openai": deploymentValues.AI.BridgeConfig.OpenAI.BaseURL.Value(),
"anthropic": deploymentValues.AI.BridgeConfig.Anthropic.BaseURL.Value(),
},
// OpenAI: deploymentValues.AI.BridgeConfig.OpenAI.Key.Value(),
// Anthropic: deploymentValues.AI.BridgeConfig.Anthropic.Key.Value(),
// BaseURLByProvider: map[string]string{
// "openai": deploymentValues.AI.BridgeConfig.OpenAI.BaseURL.Value(),
// "anthropic": deploymentValues.AI.BridgeConfig.Anthropic.BaseURL.Value(),
// },
}
}