mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-09 16:35:27 +02:00
Make opencode-local usable behind an LLM gateway via declarative env, without
hard-coding provider/model assumptions:
- PAPERCLIP_OPENCODE_PROVIDERS: merge custom/extended providers (OpenCode `provider`
shape) into the runtime opencode.json. OpenCode resolves `--model provider/model`
only if the model is in a provider's `models` map, and OPENCODE_ALLOW_ALL_MODELS
does NOT bypass getModel() -- so gateway models must be registered. {env:VAR}
placeholders are expanded server-side so secrets need not depend on the run env.
- PAPERCLIP_OPENCODE_SMALL_MODEL / PAPERCLIP_OPENCODE_CHEAP_MODEL: pin the auxiliary
(title-gen) and budget (recovery) lanes to gateway-served models, else they fall
back to built-in defaults the gateway may not serve ('no keys found that support
model'). Defaults unchanged.
- Honour OPENCODE_ALLOW_ALL_MODELS on the REMOTE execution path too (was local-only).
- Optional PAPERCLIP_OPENCODE_PRINT_LOGS toggle to surface OpenCode logs on stderr
for diagnosing remote/sandbox runs.
All env-driven and opt-in; defaults preserve current behaviour. +tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>