Skip to content

fix: stabilize local model deployment state#59

Merged
skyguan92 merged 3 commits into
developfrom
fix/aima-runtime-model-state-bugs
May 14, 2026
Merged

fix: stabilize local model deployment state#59
skyguan92 merged 3 commits into
developfrom
fix/aima-runtime-model-state-bugs

Conversation

@rjckkkkk
Copy link
Copy Markdown
Collaborator

Summary

  • Make deploy idempotent for an already-running same-model deployment and surface reused deployments instead of starting duplicates.
  • Narrow undeploy matching so ambiguous model-name queries do not remove multiple deployments at once.
  • Keep the Agent LLM client/config fresh after deploy/config changes and fold catalog aliases out of model.list so BF16 aliases do not appear as duplicate local models.

Test Plan

  • go test ./cmd/aima -run 'Test(DeployApplyReusesExistingSameModelDeploymentByLabel|DeployDeleteRejectsAmbiguousModelNameQuery|DeployDeleteFailsWhenDeploymentStillListedAfterDelete|ListModelsFoldsCatalogAliasesIntoCanonicalModel|BuildFreshAgentStatusPayloadReloadsModelFromDB)$' -count=1
  • go test ./internal/knowledge -run TestResolveCatalogModelName -count=1
  • go test ./... -count=1
  • GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -o /tmp/aima-pr-final ./cmd/aima

@rjckkkkk rjckkkkk requested a review from skyguan92 May 13, 2026 04:52
@rjckkkkk
Copy link
Copy Markdown
Collaborator Author

Follow-up for the desktop-local UI auth issue seen on the 184 server:

  • Loopback /ui/ requests now receive a bootstrap API key from the server.
  • Non-loopback hosts keep the bootstrap key empty, so LAN UI responses do not include the key.
  • Verified on 184: local bootstrap is present, remote-host response has no key, unauthenticated API writes still return 401, authenticated writes return 200.
  • Re-packed the desktop bundle at /home/qujing/aima-desktop-build-20260513-ui-auth/aima-linux-amd64-desktop.tar.gz.

…-model-state-bugs

# Conflicts:
#	cmd/aima/tooldeps_deploy.go
#	cmd/aima/uat_chain_test.go
Copy link
Copy Markdown
Contributor

@skyguan92 skyguan92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed after merging current develop and resolving the deploy.delete fallback/exact-name behavior with #57. Local verification passed: targeted deploy.delete regressions and go test ./... on head 1ed098e.

@skyguan92 skyguan92 merged commit 16aea12 into develop May 14, 2026
1 check 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.

2 participants