Skip to content

fix(controller): allow clearing Manager model provider - #1232

Merged
shiyiyue1102 merged 1 commit into
agentscope-ai:mainfrom
shiyiyue1102:codex/fix-issue-1224-provider-recovery
Sep 10, 2026
Merged

fix(controller): allow clearing Manager model provider#1232
shiyiyue1102 merged 1 commit into
agentscope-ai:mainfrom
shiyiyue1102:codex/fix-issue-1224-provider-recovery

Conversation

@shiyiyue1102

@shiyiyue1102 shiyiyue1102 commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • distinguish an omitted modelProvider update from an explicitly empty value
  • allow the Manager update API to clear a stale spec.modelProvider binding
  • add agt update manager --model-provider, including --model-provider= for recovery
  • cover both API and CLI behavior with regression tests

Context

When a Manager has switched to a model from a newly added provider and that provider or route is later removed, the persisted provider binding cannot currently be cleared through the update API. The Manager continues reconciling/requesting against the unavailable provider after restart, leaving reinstall as the apparent recovery path.

This change makes the recovery operation explicit:

agt update manager --name default \
  --model <known-good-model> \
  --model-provider=

The pointer field in UpdateManagerRequest preserves PATCH semantics: an omitted field remains unchanged, while an explicitly empty value clears the binding.

The original report also says adding the provider causes an immediate chat error. It does not include the version, deployment mode, exact error, or logs, so this PR addresses the confirmed persistent recovery defect without claiming a cause for that separate initial failure.

Verification

  • rebased onto current origin/main (eeaab643)
  • go test ./... from agentteams-controller — passed
  • git diff --check origin/main...HEAD — passed

Related to #1224


Summary

  • distinguish an omitted modelProvider update from an explicitly empty value
  • allow the Manager update API to clear a stale spec.modelProvider binding
  • add agt update manager --model-provider, including --model-provider= for recovery
  • cover both API and CLI behavior with regression tests

Context

When a Manager has switched to a model from a newly added provider and that provider or route is later removed, the persisted provider binding cannot currently be cleared through the update API. The Manager continues reconciling/requesting against the unavailable provider after restart, leaving reinstall as the apparent recovery path.

This change makes the recovery operation explicit:

agt update manager --name default \
--model <known-good-model> \
--model-provider=

The pointer field in UpdateManagerRequest preserves PATCH semantics: an omitted field remains unchanged, while an explicitly empty value clears the binding.

The original report also says adding the provider causes an immediate chat error. It does not include the version, deployment mode, exact error, or logs, so this PR addresses the confirmed persistent recovery defect without claiming a cause for that separate initial failure.

Verification

  • rebased onto current origin/main (eeaab643)
  • go test ./... from agentteams-controller — passed
  • git diff --check origin/main...HEAD — passed

Related to #1224

@shiyiyue1102
shiyiyue1102 merged commit 517caff into agentscope-ai:main Sep 10, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant