-
Notifications
You must be signed in to change notification settings - Fork 298
Rename supportsLLMGateway bool to llmGatewayPort int and remove SupportsLLMGateway() from interface
#18838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename supportsLLMGateway bool to llmGatewayPort int and remove SupportsLLMGateway() from interface
#18838
Changes from all commits
28726f8
45254fe
dccbed6
7c1d9c0
5373113
1df9e44
be822dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,20 +105,15 @@ func collectDockerImages(tools map[string]any, workflowData *WorkflowData, actio | |
| dockerLog.Printf("Added AWF agent container: %s", agentImage) | ||
| } | ||
|
|
||
| // Add api-proxy sidecar container for engines that support LLM gateway | ||
| // Add api-proxy sidecar container (required for all engines — LLM gateway is mandatory) | ||
| // The api-proxy holds LLM API keys securely and proxies requests through Squid | ||
| // Each engine uses its own dedicated port for communication | ||
| // Check if the engine supports LLM gateway by querying the engine registry | ||
| if workflowData != nil && workflowData.AI != "" { | ||
| registry := GetGlobalEngineRegistry() | ||
| engine, err := registry.GetEngine(workflowData.AI) | ||
| if err == nil && engine.SupportsLLMGateway() > 0 { | ||
| apiProxyImage := constants.DefaultFirewallRegistry + "/api-proxy:" + awfImageTag | ||
| if !imageSet[apiProxyImage] { | ||
| images = append(images, apiProxyImage) | ||
| imageSet[apiProxyImage] = true | ||
| dockerLog.Printf("Added AWF api-proxy sidecar container for engine with LLM gateway support: %s", apiProxyImage) | ||
| } | ||
| apiProxyImage := constants.DefaultFirewallRegistry + "/api-proxy:" + awfImageTag | ||
| if !imageSet[apiProxyImage] { | ||
| images = append(images, apiProxyImage) | ||
| imageSet[apiProxyImage] = true | ||
| dockerLog.Printf("Added AWF api-proxy sidecar container: %s", apiProxyImage) | ||
| } | ||
| } | ||
|
Comment on lines
111
to
118
|
||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RegistervalidatesllmGatewayPortonly when the engine satisfies an interface with an unexported method (getLLMGatewayPort). Engines implemented outside theworkflowpackage can’t implement that method, so the assertion will always fail and the validation will be skipped. IfllmGatewayPortis mandatory, consider making the port accessor exported (or part of a public optional interface) and/or treating “missing port provider” as an error so invalid/misconfigured engines can’t be registered silently.This issue also appears on line 375 of the same file.