Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion agentteams-controller/cmd/agt/llm_preflight.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
const (
defaultOpenAICompatibleBaseURL = "https://api.openai.com/v1"
defaultQwenCompatibleBaseURL = "https://dashscope.aliyuncs.com/compatible-mode/v1"
defaultAtlasCloudBaseURL = "https://api.atlascloud.ai/v1"
defaultLLMPreflightTimeout = 30 * time.Second
defaultLLMPreflightRetries = 2
defaultLLMPreflightRetryBackoff = 500 * time.Millisecond
Expand Down Expand Up @@ -97,7 +98,7 @@ func llmPreflightCmd() *cobra.Command {
},
}

cmd.Flags().StringVar(&opts.Provider, "provider", opts.Provider, "LLM provider (openai-compat|qwen|custom)")
cmd.Flags().StringVar(&opts.Provider, "provider", opts.Provider, "LLM provider (openai-compat|qwen|atlascloud|custom)")
cmd.Flags().StringVar(&opts.APIKey, "api-key", opts.APIKey, "LLM API key")
cmd.Flags().StringVar(&opts.BaseURL, "base-url", opts.BaseURL, "OpenAI-compatible base URL")
cmd.Flags().StringVar(&opts.Model, "model", opts.Model, "Model name to probe")
Expand Down Expand Up @@ -171,6 +172,8 @@ func resolveLLMPreflightBaseURL(provider, baseURL string) (string, error) {
baseURL = defaultOpenAICompatibleBaseURL
case "qwen":
baseURL = defaultQwenCompatibleBaseURL
case "atlascloud":
baseURL = defaultAtlasCloudBaseURL
default:
return "", fmt.Errorf("LLM base URL is required for provider %q (set AGENTTEAMS_OPENAI_BASE_URL or --base-url)", provider)
}
Expand Down
14 changes: 14 additions & 0 deletions agentteams-controller/cmd/agt/llm_preflight_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ func TestResolveLLMPreflightConfigDefaultsQwen(t *testing.T) {
}
}

func TestResolveLLMPreflightConfigDefaultsAtlasCloud(t *testing.T) {
cfg, err := resolveLLMPreflightConfig(llmPreflightOptions{
Provider: "atlascloud",
APIKey: "atlas-test",
Model: "deepseek-ai/deepseek-v4-pro",
})
if err != nil {
t.Fatalf("resolveLLMPreflightConfig: %v", err)
}
if cfg.BaseURL != defaultAtlasCloudBaseURL {
t.Fatalf("BaseURL=%q, want Atlas Cloud endpoint", cfg.BaseURL)
}
}

func TestResolveLLMPreflightConfigCustomProviderRequiresBaseURL(t *testing.T) {
_, err := resolveLLMPreflightConfig(llmPreflightOptions{
Provider: "custom-vendor",
Expand Down
4 changes: 4 additions & 0 deletions changelog/current.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Record image-affecting changes to `manager/`, `worker/`, `copaw/`, `hermes/`, `o

---

**Features**

- **Atlas Cloud LLM preset**: Resolve the Atlas Cloud OpenAI-compatible endpoint for Helm runtime and preflight configuration when no explicit base URL is set. ([2a340b5](https://github.com/agentscope-ai/AgentTeams/commit/2a340b5))

**Bug Fixes**

- **Team Worker room boundary convergence**: Remove Manager again after standalone Worker infrastructure reconciliation restores regular Team Worker personal-room membership. ([b5b0add](https://github.com/agentscope-ai/AgentTeams/commit/b5b0add))
Expand Down
12 changes: 12 additions & 0 deletions helm/agentteams/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ Shared runtime Secret name.
{{- printf "%s-runtime-env" (include "agentteams.fullname" .) }}
{{- end }}

{{/*
Effective OpenAI-compatible LLM base URL. Explicit values always win; known
providers can supply a usable endpoint when credentials.llmBaseUrl is omitted.
*/}}
{{- define "agentteams.llmBaseURL" -}}
{{- if .Values.credentials.llmBaseUrl -}}
{{- .Values.credentials.llmBaseUrl -}}
{{- else if eq (.Values.credentials.llmProvider | default "") "atlascloud" -}}
{{- "https://api.atlascloud.ai/v1" -}}
{{- end -}}
{{- end }}

{{/* ── Component naming helpers ────────────────────────────────────────── */}}

{{- define "agentteams.manager.fullname" -}}
Expand Down
5 changes: 3 additions & 2 deletions helm/agentteams/templates/preflight/llm-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- if .Values.preflight.llm.enabled }}
{{- $name := printf "%s-llm-preflight" (include "agentteams.fullname" .) | trunc 63 | trimSuffix "-" }}
{{- $llmBaseURL := include "agentteams.llmBaseURL" . }}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -16,8 +17,8 @@ stringData:
AGENTTEAMS_LLM_API_KEY: {{ required "credentials.llmApiKey is required" .Values.credentials.llmApiKey | quote }}
AGENTTEAMS_LLM_PROVIDER: {{ .Values.credentials.llmProvider | quote }}
AGENTTEAMS_DEFAULT_MODEL: {{ .Values.credentials.defaultModel | quote }}
{{- if .Values.credentials.llmBaseUrl }}
AGENTTEAMS_OPENAI_BASE_URL: {{ .Values.credentials.llmBaseUrl | quote }}
{{- if $llmBaseURL }}
AGENTTEAMS_OPENAI_BASE_URL: {{ $llmBaseURL | quote }}
{{- end }}
AGENTTEAMS_LLM_PREFLIGHT_STRICT: {{ .Values.preflight.llm.strict | quote }}
AGENTTEAMS_LLM_PREFLIGHT_TIMEOUT_SECONDS: {{ .Values.preflight.llm.timeoutSeconds | quote }}
Expand Down
5 changes: 3 additions & 2 deletions helm/agentteams/templates/secrets/runtime-env.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- $llmBaseURL := include "agentteams.llmBaseURL" . }}
apiVersion: v1
kind: Secret
metadata:
Expand Down Expand Up @@ -30,8 +31,8 @@ stringData:
AGENTTEAMS_LLM_API_KEY: {{ required "credentials.llmApiKey is required" .Values.credentials.llmApiKey | quote }}
AGENTTEAMS_LLM_PROVIDER: {{ .Values.credentials.llmProvider | quote }}
AGENTTEAMS_DEFAULT_MODEL: {{ .Values.credentials.defaultModel | quote }}
{{- if .Values.credentials.llmBaseUrl }}
AGENTTEAMS_OPENAI_BASE_URL: {{ .Values.credentials.llmBaseUrl | quote }}
{{- if $llmBaseURL }}
AGENTTEAMS_OPENAI_BASE_URL: {{ $llmBaseURL | quote }}
{{- end }}
{{- /* Matrix AppService tokens: controller panics without as/hs_token. Resolution order: values override -> existing Secret -> generated. See values.yaml matrix.appservice. */}}
AGENTTEAMS_MATRIX_APPSERVICE_ENABLED: {{ .Values.matrix.appservice.enabled | toString | quote }}
Expand Down
18 changes: 18 additions & 0 deletions tests/check-helm-agentteams.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,22 @@ helm template agentteams "${CHART}" "${COMMON_ARGS[@]}" > "${render}"
grep -q 'name: agentteams-controller' "${render}"
grep -q 'app.kubernetes.io/name: agentteams' "${render}"

helm template agentteams "${CHART}" "${COMMON_ARGS[@]}" \
--set credentials.llmProvider=atlascloud \
--set credentials.defaultModel=deepseek-ai/deepseek-v4-pro > "${render}"

if [ "$(grep -c 'AGENTTEAMS_OPENAI_BASE_URL: "https://api.atlascloud.ai/v1"' "${render}")" -ne 2 ]; then
echo "FAIL: Atlas Cloud base URL must be injected into preflight and runtime Secrets" >&2
exit 1
fi

helm template agentteams "${CHART}" "${COMMON_ARGS[@]}" \
--set credentials.llmProvider=atlascloud \
--set credentials.llmBaseUrl=https://proxy.example.com/v1 > "${render}"

if [ "$(grep -c 'AGENTTEAMS_OPENAI_BASE_URL: "https://proxy.example.com/v1"' "${render}")" -ne 2 ]; then
echo "FAIL: Explicit LLM base URL must override the Atlas Cloud preset" >&2
exit 1
fi

echo "PASS: AgentTeams Helm release renders canonical resource names"
Loading