{"record":{"id":"88edd39ca19f12ab","repo":"paperclipai/paperclip","slug":"paperclip-runner-opencode-model-invalid","errorCode":"paperclip_runner_opencode_model_invalid","errorMessage":"Paperclip Runner OpenCode requires model in provider/model form.","messagePattern":"Paperclip Runner OpenCode requires model in provider/model form\\.","errorType":"error_code","errorClass":"PaperclipRunnerProviderProfileError","httpStatus":null,"severity":"error","filePath":"server/src/services/native-runtime/provider-profile.ts","lineNumber":328,"sourceCode":"    throw new PaperclipRunnerProviderProfileError(\n      \"paperclip_runner_provider_unsupported\",\n      \"Paperclip Runner provider must be Codex, OpenCode, Claude Managed, AWS AgentCore, or ACPX.\",\n    );\n  }\n\n  assertPermissionMode(candidate, config);\n  const model = optionalString(config.model);\n  if (candidate === \"codex\") {\n    return {\n      provider: \"codex\",\n      backend: \"codex_app_server\",\n      model,\n    };\n  }\n\n  if (candidate === \"opencode\") {\n    if (!model || !model.includes(\"/\") || model.endsWith(\"/\")) {\n      throw new PaperclipRunnerProviderProfileError(\n        \"paperclip_runner_opencode_model_invalid\",\n        \"Paperclip Runner OpenCode requires model in provider/model form.\",\n      );\n    }\n    return {\n      provider: \"opencode\",\n      backend: \"opencode_server\",\n      model,\n    };\n  }\n\n  if (candidate === \"claude_managed\") {\n    const managedProfileId = optionalString(config.managedProfileId);\n    if (!managedProfileId) {\n      throw new PaperclipRunnerProviderProfileError(\n        \"paperclip_runner_claude_managed_profile_required\",\n        \"Paperclip Runner Claude Managed requires a company managed-agent profile.\",\n      );","sourceCodeStart":310,"sourceCodeEnd":346,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/native-runtime/provider-profile.ts#L310-L346","documentation":"Guard in resolvePaperclipRunnerProviderProfile for the opencode branch: the model must be a non-empty 'provider/model' string (contains '/' and does not end with '/'), otherwise 'paperclip_runner_opencode_model_invalid' is thrown. OpenCode's server API requires qualified model identifiers; a bare model name or dangling slash cannot be resolved.","triggerScenarios":"Thrown at server/src/services/native-runtime/provider-profile.ts:322 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set model to the full 'provider/model' form, e.g. 'anthropic/claude-sonnet-4'.","Remove a trailing slash or fix truncation in the stored model string.","Leave model unset to use OpenCode's default model instead of an unqualified one."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-02T18:44:00.616Z","contentChangedAt":"2026-09-02T18:44:00.616Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}