cli providers take a model: provider prefix, {model}, -m occli/MODEL

A kind = cli provider now has a default model and a prefix
(provider = opencode), so -m occli/deepseek-v4.1-flash-free runs
"opencode run --model opencode/deepseek-v4.1-flash-free". {model} in cmd
marks where the model goes, otherwise --model is appended; a model that
already has a '/' is used as it is. sp_cli_command() builds the command for
-m, delegates and the cli plugin's pool fallback. Model names are limited to
letters, digits and ._:/@+- since the command goes through /bin/sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
lotherkandClaude Opus 5.5 committed 2026-11-13 20:08:16 +00:00
1 parent 05c8d936e7
commit 2c58dcfd2a
8 files changed
+125 -12

No files matched your search

+6 -2
View File
@@ -630,8 +630,12 @@ exec_delegate(const struct del_ctx *c, const struct sp_delegate *d,
*/
if (cli) {
sp_delegate_cli_plugin(c->self, plug, sizeof(plug));
if (d->cmd[0] != '\0')
(void)setenv("SPLINTER_CLI_CMD", d->cmd, 1);
{
char cmd[600];
if (sp_cli_command(d, NULL, cmd, sizeof(cmd)) == 0)
(void)setenv("SPLINTER_CLI_CMD", cmd, 1);
}
if (d->key[0] != '\0' && !remote) {
const char *kenv = d->key_env[0] != '\0' ?
d->key_env : "CLAUDE_CODE_OAUTH_TOKEN";