Skip to content

Cap routing text and harden routine dispatch and page-frame params - #548

Merged
davidmckayv merged 2 commits into
CopilotKit:mainfrom
Ayush7614:feat/routing-limits-validation
Sep 15, 2026
Merged

davidmckayv merged 2 commits into
CopilotKit:mainfrom
Ayush7614:feat/routing-limits-validation

Conversation

@Ayush7614

Copy link
Copy Markdown
Contributor

POST /api/route passed unbounded text to the model prompt; over 10000 chars is now a 400 before the roster or router. POST /internal/routines/run accepted an empty routineRunId string as 202 while the worker swallowed the failure; only non-empty ids dispatch. GET /computers/:botId/page-frame/:toolCallId passed params straight to the frame table; blanks and overlong ids are now 400 junk-read guards.

Verified: bun test server/tests/routing-limits-validation.test.ts — 6 pass, 0 fail. Biome lint and format clean.

POST /api/route passed unbounded text to the model prompt; over 10000
chars is now a 400 before the roster or router. POST
/internal/routines/run accepted an empty routineRunId string as 202
while the worker swallowed the failure; only non-empty ids dispatch.
GET /computers/:botId/page-frame/:toolCallId passed params straight to
the frame table; blanks and overlong ids are now 400 junk-read guards.

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code-verified clean; CI green on this sha.

@davidmckayv
davidmckayv merged commit 471d1a4 into CopilotKit:main Sep 15, 2026
15 checks passed
davidmckayv added a commit that referenced this pull request Sep 15, 2026
…564)

The Unreleased changelog was missing several changes that landed since v0.0.11: the Composio
connector (#481), the removal of a skill's grants when it is uninstalled (#563), and the
request-validation sweep that answers a malformed request with a 400 rather than coercing it or
letting it through (#543-#548, #550), including the one fail-open it closed. Added, each checked
against the code.

The README's Governed MCP bullet named only Google Drive and Notion; Composio brokers a few hundred
more apps in the catalogue now, so it says so.
davidmckayv added a commit that referenced this pull request Sep 16, 2026
…e coworker it is for (#575)

`POST /api/route` refuses a message over 10,000 characters since #548,
so the prompt it builds stays bounded. The composer has no such limit,
and both callers of `routeMessage` carry on past a routing that failed.
The home composer caught the 400 and sent the message to the default
coworker, under a line that says it was "Sent to the coworker it is
for". `startWithChosen` swallowed it, so a coworker chosen with `@` or
from the To: field started with no `channel.routed` row, even though
that branch never reads the text.

`routeMessage` now sends the trimmed opening, cut to the route's limit
and one unit short when the cut would split a character. Who a message
is for is plain from its opening, and the whole message still goes to
the coworker. A message that fits is sent as before.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: David McKay <david@copilotkit.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants