mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
revert: "fix: avoid an errant license warning banner on new deployments that d…" (#26240)
Reverts coder/coder#26239 We cannot disable a feature which was previously enabled; this is a BC break. This is also using `AIGatewayRoutingEnabled` which will be removed in the next release.
This commit is contained in:
+4
-9
@@ -1053,15 +1053,10 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
|
||||
// dispatch LLM requests via the in-process transport without
|
||||
// crossing the gated /api/v2/aibridge HTTP route. The HTTP route
|
||||
// itself is registered (and license-gated) only by enterprise/coderd;
|
||||
// in AGPL builds it does not exist at all.
|
||||
//
|
||||
// The daemon must run whenever either consumer needs it: the
|
||||
// external/licensed AI Gateway HTTP API (CODER_AI_GATEWAY_ENABLED)
|
||||
// or Coder Agents routing chat traffic through the in-process
|
||||
// transport (CODER_CHAT_AI_GATEWAY_ROUTING_ENABLED). Agents get
|
||||
// access regardless of license entitlement; the external HTTP
|
||||
// route stays license-gated.
|
||||
if vals.AI.BridgeConfig.Enabled.Value() || vals.AI.Chat.AIGatewayRoutingEnabled.Value() {
|
||||
// in AGPL builds it does not exist at all. The daemon starts here
|
||||
// unconditionally when the bridge feature is enabled by config so
|
||||
// chatd can use it regardless of license entitlement.
|
||||
if vals.AI.BridgeConfig.Enabled.Value() {
|
||||
aibridgeReg := prometheus.WrapRegistererWithPrefix("coder_aibridged_", coderAPI.PrometheusRegistry)
|
||||
aibridgeMetrics := aibridge.NewMetrics(aibridgeReg)
|
||||
aibridgeProviders, _, err := BuildProviders(aibridgeInitCtx, options.Database, vals.AI.BridgeConfig, logger.Named("aibridge.providers"), aibridgeMetrics)
|
||||
|
||||
Reference in New Issue
Block a user