Skip to content

feat(home): publish ACP plugin models for local dispatch and billing - #219

Merged
hkfires merged 10 commits into
devfrom
acp
Nov 30, 2026
Merged

hkfires merged 10 commits into
devfrom
acp

Conversation

@hkfires

@hkfires hkfires commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Home reads model catalogs from enabled ACP plugins and publishes them as acp/<registered-model-id>. Home authorizes each request, then the serving CPA executes the selected plugin with its local account.

  • Give credential models and explicit aliases precedence when public model IDs overlap. Resolve conflicts between ACP plugins by priority, then by plugin ID.
  • Use the plugin ID and registered model ID for pricing, so operators can configure prices before the first request. Catalog quotes and charges use the same pricing rules across service tiers and input-token thresholds.
  • Load plugin catalogs independently. On upgrade or uninstall, wait for active readers before removing obsolete artifacts. Preserve pinned versions when resolving older direct installs.
  • Update the CLIProxyAPI dependency to v8.1.6 for local plugin dispatch.

Verification

git diff --check passed, and Git reported a clean merge with dev. Go tests are pending. The branch adds regression tests for dispatch precedence, catalog updates, price discovery, and billing deduplication.

Read static model catalogs from pinned ACP-tagged store plugins
in a short-lived catalog worker subprocess and publish them as
acp/<registered-id> in RESP, management, and user model lists.

Give credential models and explicit aliases precedence and pick
the highest-priority ACP plugin on ID conflicts. Authorize
local-plugin-dispatch against API key scope, channel, billing,
and active CPA identity so the serving node executes locally.

Exclude local executor usage from Home credential quota and
health updates while still billing the caller once, and bump
CLIProxyAPI to v8.1.6 for the static executor model API.
Load ACP catalogs asynchronously with a brief first-read window so
slow or cancelled readers cannot block or discard healthy plugin
routes, and cancel workers on plugin removal or shutdown.

Align ACP billing, price-import discovery, user pricing quotes, and
availability on the plugin provider and registered model ID, falling
back to the public acp/ ID. Load only plugin sync settings from the
database, reserve the RESP error envelope from provider sections, and
document the catalog worker receipt protocol.
Use the same rule selection for model catalogs and charges so service tiers and token bands include their fallback prices.
Resolve a source-only manifest against its pinned registry version when building the CPA sync plan. Share version selection with store installs.
Track ACP route ownership as credentials register their models and check only the matching owners during dispatch.
Reuse decoded database settings and catalog inputs across authorization requests while preserving YAML tags and referenced values.
Recheck overlapping configuration reads and preload catalogs after publication. Stop late readers from starting workers after shutdown.
Track artifact readers across configuration changes. Retain disabled installations and files for other platforms during cleanup.
Allow up to two minutes for the artifact download and start the worker deadline afterwards. Cancel either stage when its installation is withdrawn.
CPA may report the caller's API key as the source when the upstream
account is unknown. Mask it with the same format as
client.api_key_masked to avoid leaking the raw key in usage records
and request events, and document the source field there.
@hkfires
hkfires merged commit b0d9808 into dev Nov 30, 2026
2 checks passed
@hkfires
hkfires deleted the acp branch November 30, 2026 03:43
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