Description
The server rejects part IDs that don't start with prt — but the SDK types id as string, so invalid IDs pass the type checker and only fail at runtime.
Steps to reproduce
- Install
@opencode-ai/sdk
- Call the prompt API with a part containing
id: "task_something"
- Runtime error:
Invalid string: must start with "prt"
Root cause
openapi.json already has "pattern": "^prt.*" on these id fields, but the generator doesn't translate that into a template-literal type.
Description
The server rejects part IDs that don't start with
prt— but the SDK typesidasstring, so invalid IDs pass the type checker and only fail at runtime.Steps to reproduce
@opencode-ai/sdkid: "task_something"Invalid string: must start with "prt"Root cause
openapi.jsonalready has"pattern": "^prt.*"on these id fields, but the generator doesn't translate that into a template-literal type.