Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for custom agent runners to the @upstash/box SDK by introducing a new custom harness, wiring request payloads to include custom runner configuration, and providing a helper for implementing runner processes that emit Box’s SSE protocol.
Changes:
- Introduces
Agent.Customplus newCustomRunnerConfig/CustomAgentConfigtypes to represent custom runner configuration in the SDK. - Updates the SDK client to serialize custom runner configuration (
custom_runner) and addsBox.configureCustomRunner(...). - Adds
runCustomRunner(...)helper + tests, and extends CLI model options to include “Custom”.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/sdk/src/types.ts | Adds Agent.Custom, defines CustomRunnerConfig, and extends AgentConfig/BoxData typing for custom runners. |
| packages/sdk/src/index.ts | Exports runCustomRunner and related custom-runner types from the SDK entrypoint. |
| packages/sdk/src/custom-runner.ts | New helper for implementing a custom runner process that emits box-sse-v1 SSE events. |
| packages/sdk/src/client.ts | Adds custom-runner request serialization, custom harness inference, and configureCustomRunner. |
| packages/sdk/src/tests/custom-runner.test.ts | Tests runCustomRunner arg parsing and SSE emission. |
| packages/sdk/src/tests/box-from-snapshot.test.ts | Verifies fromSnapshot sends custom_runner configuration. |
| packages/sdk/src/tests/box-create.test.ts | Verifies create sends custom_runner, omits agent API key, defaults model, and errors when missing runner config. |
| packages/sdk/src/tests/box-config-model.test.ts | Adds test coverage for configureCustomRunner. |
| packages/cli/src/models.ts | Adds CLI model list entry for Agent.Custom. |
| .changeset/custom-runner-sdk.md | Changeset bump for adding SDK support for custom runners. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+223
to
+226
| } | ||
| | { harness: Agent.Cursor; model: CursorModel; provider?: never; runner?: never } | ||
| | { harness: Exclude<string, "custom">; model: string; provider?: never; runner?: never } | ||
| | { |
| } | ||
| | { | ||
| /** @deprecated Use `harness` instead. */ | ||
| runner: Exclude<string, "custom">; |
for harness, Agent.Custom should be used. string options are needed in order to support future models without having to release SDK versions see AI review for more context about the original change #150 (comment)
CahidArda
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.