fix(edge): drop selectWidget from the hosted router catalog#27
Conversation
Semantic widget selection has no hosted endpoint yet, so the hosted model must not propose selectWidget — it would charge a routing credit for an action the app can only decline. Instruct the model to treat on-screen selection requests as unclear instead. Bump to 0.7.1.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e66fca788
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "- enterSelectMode: {\"action\":\"enterSelectMode\"}.", | ||
| "- takeScreenshot: {\"action\":\"takeScreenshot\"}.", | ||
| "- selectWidget: {\"action\":\"selectWidget\",\"description\":string}.", | ||
| "Semantic widget selection is not available over hosted routing; treat any request to select or click an on-screen element as unclear.", |
There was a problem hiding this comment.
Update the deployed router import map
When the Supabase operator-router function is deployed, supabase/functions/operator-router/index.ts imports @pickforge/edge-shared through supabase/functions/operator-router/deno.json, which is still pinned to npm:@pickforge/[email protected] on line 5. Because this commit only changes the package source/version, the hosted router will continue loading the old 0.7.0 prompt that still advertises selectWidget, so click/select requests keep producing the action this change is trying to suppress after a normal deploy. Please bump the function import map to 0.7.1 (or otherwise make the function consume this local package update).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed — both operator-router and create-credit-checkout deno.json now pin @pickforge/[email protected]; I'll redeploy operator-router after 0.7.1 publishes so the catalog trim takes effect live.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2a72fc33e3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "- enterSelectMode: {\"action\":\"enterSelectMode\"}.", | ||
| "- takeScreenshot: {\"action\":\"takeScreenshot\"}.", | ||
| "- selectWidget: {\"action\":\"selectWidget\",\"description\":string}.", | ||
| "Semantic widget selection is not available over hosted routing; treat any request to select or click an on-screen element as unclear.", |
There was a problem hiding this comment.
Avoid charging unsupported widget-selection routes
For commands like "click the login button", this new instruction makes the hosted model return an unclear proposal, but createOperatorRouterHandler still debits after every successful completion before returning the proposal. Because that path is still a 200 response with stored metadata, users still spend the routing credit for the unsupported widget-selection request; this only stops the selectWidget action from being proposed, not the hosted-charge problem the change is meant to avoid.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Intentional — hosted routing is metered per model call, so an 'unclear' result is still a real model invocation and is billed like any other route. The app now shows this honestly ('routed · 1¢ · unclear'), and the ladder tries deterministic + BYO first (both free) before hosted ever runs. Making widget-ish commands free isn't feasible (the app can't classify a command as widget-selection before the model runs) and would open a free-routing loophole (any command could be phrased to return 'unclear'). #27's scope was to stop the model proposing an action the app can't fulfill (the charge-then-fail bug), which it does; charging for the model call itself is the correct billing model.
Refs pickforge/pickforge#192, pickforge/pickforge#191.
The hosted operator-router system prompt listed
selectWidget, so the hosted model could propose it for a command like "select the login button" — the app then can't fulfill it (semantic widget matching has no hosted endpoint yet) but the routing credit was already spent. This trimsselectWidgetfrom the hosted catalog and tells the model to treat on-screen selection asunclear, so hosted never charges for an action it can't complete. The full hosted widget-match endpoint remains tracked in #192.Patch release 0.7.1 (lockstep).
Tested
Not tested
Risk