feat(sdk): expose host agent launch options
Summary
This PR exposes the host agent launch model and effort options through the TypeScript SDK and forwards them from agents.create to the host-service agents.run route.
Why this matters
The host service already accepts model and effort for both direct agent launches and workspace-create agent sugar, but SDK consumers could not express those fields through AgentCreateParams and the direct SDK launch path dropped them before crossing the relay.
That creates a real contract drift between the public SDK and the app/host behavior: SDK-launched agents could not select the same runtime model or reasoning-effort options that the host router supports.
Changes
- Adds
modelandefforttoAgentCreateParamsand forwards them toagents.run. - Adds
modelandefforttoWorkspaceAgentLaunchso workspace-create agent sugar is typed consistently with the host route. - Adds
iconIdtoHostAgentConfigto match the host-servicesettings.agentConfigs.listresponse shape.
Validation
Commands run:
bun --cwd packages/sdk typecheck— passedgit diff --check— passed
Commands not run:
bunx @biomejs/biome@2.4.2 check packages/sdk/src/resources/agents.ts packages/sdk/src/resources/workspaces.ts— not applicable because the SDK source tree is ignored by the current Biome config; Biome reported “No files were processed”.
Failures:
bun --cwd packages/sdk build— failed
Risk
Risk level: low
Compatibility impact: additive SDK type fields and pass-through forwarding only.
Rollback simplicity: revert the two SDK resource file changes.
Remaining edge cases: unsupported model/effort ids continue to be handled by the host-service preset validation/fallback behavior.
Issue
No existing issue. This was discovered during repository analysis.
Notes for maintainers
This intentionally does not duplicate model catalog validation in the SDK. The host service already owns preset-specific support and launch argument generation.
Summary by cubic
Expose host agent launch options model and effort in the SDK and pass them through to host agents.run and workspace-create. This lets API consumers pick runtime model and reasoning effort like in the app.
- New Features
- Added
modelandefforttoAgentCreateParams; forwarded to hostagents.run. - Added
modelandefforttoWorkspaceAgentLaunchfor workspace-create launches. - Added optional
iconIdtoHostAgentConfigto match hostsettings.agentConfigs.list.
- Added
Summary by CodeRabbit
- New Features
- Agent launch and creation flows now support optional model and reasoning-effort selections when the chosen preset allows it.
- Agent configurations can now include an icon key, with fallback handling for built-in icons.