AutomaticAI lazy migration strategy
Policy: all agent and agent-service LLM inference goes through AutomaticAI.
When an active inference path bypasses the custom provider, immediately fork a
remediation worker and fix the source that controls that path. Discover and
migrate consumers as work encounters them; do not schedule a fleet-wide sweep
as a prerequisite to fixing the first finding.
This skill defines the consumer migration policy. Use
$automaticai-provider-gateway for account availability, model mapping, token
provisioning, OAuth, relay changes and gateway acceptance.
Apply on encounter
Run a focused routing check when starting work on an agent consumer or changing
its model, SDK, launcher, profile, environment, fallback, template, deployment or
provider error handling. Include primary, helper, planner, critic, summarizer,
background memory and spawned-worker paths. Hooks and services making LLM calls
are consumers too.
Check effective configuration and active source ownership, rather than grepping
every vendor name on disk. Historical documents, tests, unused examples,
provider OAuth/control planes and the gateway's own upstream adaptors are not
direct-agent inference findings. Unsupported endpoints are tracked capability
blockers, not automatically valid migrations. Read
detection and ownership.
Read session-start verification
for the installed Codex hook and deterministic actual-request receipt check.
Startup detects configured bypass before inference; post-request usage supplies
proof. Missing usage alone does not authorize declaring a bypass.
Immediately delegate a real finding
- Capture secret-free evidence: consumer, active API/endpoint/model, account
intent, source owner, runtime entrypoint and each direct helper/fallback.
A library's implicit native-provider default is a finding even if no vendor
URL is written in the file.
- Fork a real worker using the current harness's subagent facility. Give it
explicit repository/file ownership and the
worker task template. State that it is not alone
and must preserve others' edits. Pass credential references, never raw keys.
- Deduplicate by canonical configuration owner and consumer/account. Join or
message an existing remediation worker instead of spawning one per call,
generated file, failed retry or child agent. A remediation worker handles
its assigned migration inline; it must not recursively fork itself for its
own inherited bootstrap connection.
- Continue independent parent work while the worker fixes the consumer. If the
current task depends on that traffic, wait for its verified cutover before
making dependent calls. Review its result and close the finding only when
the acceptance checklist below is satisfied.
“Fork” means start a delegated agent now, not leave a Git branch or create a
ticket for later. If this harness genuinely has no delegation mechanism, perform
the same scoped remediation inline and record that limitation. Do not pretend a
fork happened. This policy authorizes migration work when applied; it does not
override a current user instruction to audit only, pause or preserve a route.
Do not kill or reconfigure the executing parent to replace its already-open
model connection. Fix its durable next-launch configuration, test a fresh
invocation and report when cutover takes effect. Avoid migration recursion and
self-restart loops. Forking does not make a disconnected account available.
The permanent fix
The worker must:
- Resolve the selected account and exact supported model from the live gateway
catalog. Preserve explicit effort, capabilities and billing intent.
- Mint/adopt a named consumer gateway token, scoped to primary and required
helper routes. Persist only
op:// references and inject secrets in memory.
- Change the authoritative provider configuration, template or launcher. For
generated profiles, update the generator input and regenerate; for installed
services, update their tracked unit/credential launcher and install it.
- Remove direct-provider precedence from that consumer's inference launch.
Configure helpers, fallback chains, retries and spawned-worker defaults to
the intended gateway routes. Keep upstream credentials with their dedicated
gateway OAuth/control-plane owners.
- Regenerate/sync and restart or relaunch only the affected runtime. Verify a
real request, then regenerate again to prove persistence and idempotence.
- Add the smallest meaningful source regression check that prevents the
discovered direct path from returning. Commit and push into the owning main
branch, including templates, sibling owners and changed submodule pins.
Use consumer recipes and cutover for the
specific source/runtime seams. Shell exports, editing one generated profile,
changing only the main model, and passing only a mock URL assertion do not close
a permanent migration.
Preserve account and capability intent
- Personal Claude stays personal; tri-devs/Intelliforia stays team. Bind Claude
helper models to the selected subscription account.
- Paid OpenRouter stays an explicitly selected paid path. Never make it a hidden
backup for a subscription failure or change existing paid intent implicitly.
- Personal Kimi uses the verified Coding-plan route and context requirement.
- Astra/Sol use the dedicated personal OpenAI grant, default
xhigh, no ultra.
If the grant is missing, prepare the source fix and keep live cutover pending;
do not replace those models with Claude, Kimi or a platform API key.
- Unsupported models/features require adding and accepting a proper gateway
route, or a concrete user decision. Do not invent a model alias or reclassify
embeddings/reranking as Chat simply to remove a vendor hostname.
Current aai/ aliases are valid. automaticai/auto is now live and opt-in for
allowed personal tokens; current policy and per-client readiness belong to the
gateway's ops/AUTO-ROUTER.md. User-authorized auto routing may select across
its token-permitted subscription accounts and fall back only to proven free
routes. It is not permission to collapse team consumers into personal or enable
a paid fallback. Preserve explicit routes unless auto adoption is authorized,
and verify the consumer's discovery parser and role/context selectors first.
Completion gate
Close a finding only when all applicable facts are proved:
- The source owner contains the correct gateway provider/URL, explicit route,
normalized effort and token reference; no raw credential is written.
- Primary, helper, worker and fallback inference paths use the gateway; provider
OAuth/control-plane traffic remains with its correct owner.
- The actual installed consumer succeeds with its intended API style, streaming
and tool features; gateway usage proves account, native model and billing.
- Source regeneration/restart preserves the result, and its focused regression
check catches reintroduction of the direct path.
- Task changes are committed, pushed and integrated into every owning main
branch;
git unpushed has no task-created findings. Report unrelated WIP
separately without changing it.
A missing grant, required human passkey, unsupported capability or unreachable
runtime remains a named open blocker with an owner and exact next step. Complete
independent preparation, keep the handoff durable in the existing project
tracker/source, and report the boundary. Never mark a blocked cutover as migrated
or broaden spending/account selection to manufacture success.
Report the consumer, source owner, chosen route/account, runtime evidence,
commits and remaining blocker. Save readable final migration documents in their
source workspace and ~/code/DeLoDocs/Projects/AutomaticAI/, verifying parity.
Examples
- Encounter a Hermes helper calling OpenRouter directly: fork one worker for
its role/template owner, select the gateway's explicit paid route only if that
paid intent is established, patch and regenerate, then prove the helper request.
- Encounter a team Claude wrapper: fork immediately; bind main and all helpers
to
automaticai/intelliforia/claude-opus-5.5, remove launch auth conflicts and
verify native Claude traffic plus the team ledger.
- Encounter Codex using personal OAuth while gateway Astra is disconnected:
fork immediately for durable preparation, retain the sign-in blocker, and
await user passkey verification before the actual gateway cutover.
- Encounter the gateway's
oauth-connections.py contacting a provider token
endpoint: that is required control-plane traffic; do not migrate it to itself.
1---2name: automaticai-provider-gateway-lazy-migration-strategy3description: Apply the AutomaticAI routing policy whenever agent or4 agent-service LLM inference bypasses api.automaticai.io, including CLI5 defaults, helper models, profiles, hooks, SDKs, workers, and fallback chains.6 Immediately fork a remediation worker for each distinct configuration owner,7 fix the durable source, verify gateway runtime traffic, and land the change.8 Gateway account, OAuth, token, and relay operations belong to9 automaticai-provider-gateway.10metadata:11 source: https://skillmd.com/skills/delorenj/automaticai-provider-gateway-lazy-migration-strategy12---1314# AutomaticAI lazy migration strategy1516**Policy: all agent and agent-service LLM inference goes through AutomaticAI.**17When an active inference path bypasses the custom provider, immediately fork a18remediation worker and fix the source that controls that path. Discover and19migrate consumers as work encounters them; do not schedule a fleet-wide sweep20as a prerequisite to fixing the first finding.2122This skill defines the consumer migration policy. Use23`$automaticai-provider-gateway` for account availability, model mapping, token24provisioning, OAuth, relay changes and gateway acceptance.2526## Apply on encounter2728Run a focused routing check when starting work on an agent consumer or changing29its model, SDK, launcher, profile, environment, fallback, template, deployment or30provider error handling. Include primary, helper, planner, critic, summarizer,31background memory and spawned-worker paths. Hooks and services making LLM calls32are consumers too.3334Check effective configuration and active source ownership, rather than grepping35every vendor name on disk. Historical documents, tests, unused examples,36provider OAuth/control planes and the gateway's own upstream adaptors are not37direct-agent inference findings. Unsupported endpoints are tracked capability38blockers, not automatically valid migrations. Read39[detection and ownership](references/detection-and-ownership.md).4041Read [session-start verification](references/session-start-verification.md)42for the installed Codex hook and deterministic actual-request receipt check.43Startup detects configured bypass before inference; post-request usage supplies44proof. Missing usage alone does not authorize declaring a bypass.4546## Immediately delegate a real finding47481. Capture secret-free evidence: consumer, active API/endpoint/model, account49 intent, source owner, runtime entrypoint and each direct helper/fallback.50 A library's implicit native-provider default is a finding even if no vendor51 URL is written in the file.522. Fork a real worker using the current harness's subagent facility. Give it53 explicit repository/file ownership and the54 [worker task template](assets/remediation-task.md). State that it is not alone55 and must preserve others' edits. Pass credential references, never raw keys.563. Deduplicate by canonical configuration owner and consumer/account. Join or57 message an existing remediation worker instead of spawning one per call,58 generated file, failed retry or child agent. A remediation worker handles59 its assigned migration inline; it must not recursively fork itself for its60 own inherited bootstrap connection.614. Continue independent parent work while the worker fixes the consumer. If the62 current task depends on that traffic, wait for its verified cutover before63 making dependent calls. Review its result and close the finding only when64 the acceptance checklist below is satisfied.6566“Fork” means start a delegated agent now, not leave a Git branch or create a67ticket for later. If this harness genuinely has no delegation mechanism, perform68the same scoped remediation inline and record that limitation. Do not pretend a69fork happened. This policy authorizes migration work when applied; it does not70override a current user instruction to audit only, pause or preserve a route.7172Do not kill or reconfigure the executing parent to replace its already-open73model connection. Fix its durable next-launch configuration, test a fresh74invocation and report when cutover takes effect. Avoid migration recursion and75self-restart loops. Forking does not make a disconnected account available.7677## The permanent fix7879The worker must:80811. Resolve the selected account and exact supported model from the live gateway82 catalog. Preserve explicit effort, capabilities and billing intent.832. Mint/adopt a named consumer gateway token, scoped to primary and required84 helper routes. Persist only `op://` references and inject secrets in memory.853. Change the authoritative provider configuration, template or launcher. For86 generated profiles, update the generator input and regenerate; for installed87 services, update their tracked unit/credential launcher and install it.884. Remove direct-provider precedence from **that consumer's inference launch**.89 Configure helpers, fallback chains, retries and spawned-worker defaults to90 the intended gateway routes. Keep upstream credentials with their dedicated91 gateway OAuth/control-plane owners.925. Regenerate/sync and restart or relaunch only the affected runtime. Verify a93 real request, then regenerate again to prove persistence and idempotence.946. Add the smallest meaningful source regression check that prevents the95 discovered direct path from returning. Commit and push into the owning main96 branch, including templates, sibling owners and changed submodule pins.9798Use [consumer recipes and cutover](references/consumer-recipes.md) for the99specific source/runtime seams. Shell exports, editing one generated profile,100changing only the main model, and passing only a mock URL assertion do not close101a permanent migration.102103## Preserve account and capability intent104105- Personal Claude stays personal; tri-devs/Intelliforia stays team. Bind Claude106 helper models to the selected subscription account.107- Paid OpenRouter stays an explicitly selected paid path. Never make it a hidden108 backup for a subscription failure or change existing paid intent implicitly.109- Personal Kimi uses the verified Coding-plan route and context requirement.110- Astra/Sol use the dedicated personal OpenAI grant, default `xhigh`, no ultra.111 If the grant is missing, prepare the source fix and keep live cutover pending;112 do not replace those models with Claude, Kimi or a platform API key.113- Unsupported models/features require adding and accepting a proper gateway114 route, or a concrete user decision. Do not invent a model alias or reclassify115 embeddings/reranking as Chat simply to remove a vendor hostname.116117Current `aai/` aliases are valid. `automaticai/auto` is now live and opt-in for118allowed personal tokens; current policy and per-client readiness belong to the119gateway's `ops/AUTO-ROUTER.md`. User-authorized auto routing may select across120its token-permitted subscription accounts and fall back only to proven free121routes. It is not permission to collapse team consumers into personal or enable122a paid fallback. Preserve explicit routes unless auto adoption is authorized,123and verify the consumer's discovery parser and role/context selectors first.124125## Completion gate126127Close a finding only when all applicable facts are proved:128129- The source owner contains the correct gateway provider/URL, explicit route,130 normalized effort and token reference; no raw credential is written.131- Primary, helper, worker and fallback inference paths use the gateway; provider132 OAuth/control-plane traffic remains with its correct owner.133- The actual installed consumer succeeds with its intended API style, streaming134 and tool features; gateway usage proves account, native model and billing.135- Source regeneration/restart preserves the result, and its focused regression136 check catches reintroduction of the direct path.137- Task changes are committed, pushed and integrated into every owning main138 branch; `git unpushed` has no task-created findings. Report unrelated WIP139 separately without changing it.140141A missing grant, required human passkey, unsupported capability or unreachable142runtime remains a named open blocker with an owner and exact next step. Complete143independent preparation, keep the handoff durable in the existing project144tracker/source, and report the boundary. Never mark a blocked cutover as migrated145or broaden spending/account selection to manufacture success.146147Report the consumer, source owner, chosen route/account, runtime evidence,148commits and remaining blocker. Save readable final migration documents in their149source workspace and `~/code/DeLoDocs/Projects/AutomaticAI/`, verifying parity.150151## Examples152153- Encounter a Hermes helper calling OpenRouter directly: fork one worker for154 its role/template owner, select the gateway's explicit paid route only if that155 paid intent is established, patch and regenerate, then prove the helper request.156- Encounter a team Claude wrapper: fork immediately; bind main and all helpers157 to `automaticai/intelliforia/claude-opus-5.5`, remove launch auth conflicts and158 verify native Claude traffic plus the team ledger.159- Encounter Codex using personal OAuth while gateway Astra is disconnected:160 fork immediately for durable preparation, retain the sign-in blocker, and161 await user passkey verification before the actual gateway cutover.162- Encounter the gateway's `oauth-connections.py` contacting a provider token163 endpoint: that is required control-plane traffic; do not migrate it to itself.