Problem
The external OpenCode profile merged in #359 correctly avoids installing/configuring WordPress plugins and avoids writing gateway credentials into the runtime. It also skips ai_gateway_configure_opencode, leaving persistent external OpenCode/Kimaki without the wp-ai-gateway/site-default provider definition even when OPENAI_BASE_URL and OPENAI_API_KEY are delivered securely in the runtime process environment.
A one-shot mediator can pass --model wp-ai-gateway/site-default, but the persistent profile cannot resolve that provider from its generated opencode.json. Product templates should not duplicate the wp-coding-agents-owned provider shape.
Desired behavior
When --external-wordpress --runtime opencode --with-ai-gateway is selected:
- keep skipping plugin installation, gateway route mutation, token minting, and
.opencode/wp-ai-gateway.env writes
- add the existing credential-free
wp-ai-gateway provider/model shape to runtime-local opencode.json
- reference
${OPENAI_BASE_URL} and OPENAI_API_KEY only through OpenCode environment placeholders
- require the operator/runtime to supply those variables when OpenCode or Kimaki starts
- preserve current colocated
--with-ai-gateway behavior unchanged
- verify no secret value or external endpoint is persisted in generated files
Acceptance
- external runtime regression asserts the provider and default model are generated
- setup reruns are idempotent
- no WordPress mutation command or gateway env file is produced for external mode
- missing runtime credentials fail at runtime, not by baking credentials into setup output
AI assistance
OpenAI gpt-5.6-sol via OpenCode was used to trace the merged external-profile and AI Gateway setup contracts and draft this issue. Chris Huber reviewed and is responsible for the tracker content.
Problem
The external OpenCode profile merged in #359 correctly avoids installing/configuring WordPress plugins and avoids writing gateway credentials into the runtime. It also skips
ai_gateway_configure_opencode, leaving persistent external OpenCode/Kimaki without thewp-ai-gateway/site-defaultprovider definition even whenOPENAI_BASE_URLandOPENAI_API_KEYare delivered securely in the runtime process environment.A one-shot mediator can pass
--model wp-ai-gateway/site-default, but the persistent profile cannot resolve that provider from its generatedopencode.json. Product templates should not duplicate the wp-coding-agents-owned provider shape.Desired behavior
When
--external-wordpress --runtime opencode --with-ai-gatewayis selected:.opencode/wp-ai-gateway.envwriteswp-ai-gatewayprovider/model shape to runtime-localopencode.json${OPENAI_BASE_URL}andOPENAI_API_KEYonly through OpenCode environment placeholders--with-ai-gatewaybehavior unchangedAcceptance
AI assistance
OpenAI
gpt-5.6-solvia OpenCode was used to trace the merged external-profile and AI Gateway setup contracts and draft this issue. Chris Huber reviewed and is responsible for the tracker content.