From 1583e988f12f0da2baee6bb950d90dae2497a641 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 1 May 2026 14:19:02 +0800 Subject: [PATCH] fix(llm): update connector ID handling for built-in providers - Enhanced the extractConnectorID function to correctly return the connector ID for built-in providers without appending a model, preventing the creation of non-existent composite IDs. - Improved logic for handling connector IDs based on provider source, ensuring accurate retrieval in various scenarios. --- llmprovider/roles.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llmprovider/roles.go b/llmprovider/roles.go index aa2670e7..8a3ff3ee 100644 --- a/llmprovider/roles.go +++ b/llmprovider/roles.go @@ -146,6 +146,13 @@ func (r *Registry) extractConnectorID(target interface{}) string { } return rt.Provider } + + // Builtin providers have model baked into the connector itself; + // appending :model would create a non-existent composite ID. + if p.Source == ProviderSourceBuiltIn { + return p.ConnectorID + } + if rt.Model != "" { return p.ConnectorID + ":" + rt.Model }