fix(console): the API console lists the whole AI family, and the tool preview stops linking to a 404 (framework#3718) - #2925
Merged
Conversation
… preview stops linking to a 404 (framework#3718) #2921 fixed this page for ONE server-side builder, `buildAIRoutes()`. The `/api/v1/ai/**` family is seven builders plus one route mounted by `objectos-runtime`, so the AI group still showed under half of what exists. All 26 routes are here now, grouped as cloud's ledger groups them (objectstack-ai/cloud#903 widens the audit on the server side). Fourteen entries added: `/agents` ×2, `/assistant` ×3, `/tools` ×2, `/pending-actions` ×4, `/evals/runs`, `/conversations/:id/debug`, `/usage`. Two behavioural details carried over from the #2921 finding rather than re-learned: - `/agents/:agentName/chat` and `/assistant/chat` are dual-mode on the same `stream !== false` flag `/chat` is, so their "try it" templates send `stream: false`. Without it the console buffers an SSE body through `res.text()` and renders a wall of `data:` frames for a JSON-shaped request. - `/tools/:toolName/execute` needs `{ parameters: {} }`; `/evals/runs` needs `{ caseId }` and makes real paid LLM calls, which its description says. Separately, ToolPreview's "Open in API Console" deep-linked to `/api/v1/ai/tools/:toolName/invoke`. That verb has never been mounted — the route is `/execute` — so the one first-party caller of the tool routes pointed at a guaranteed 404, the same shape as the three dead AI endpoints #2921 removed from this very page. Mount gating is documented where it matters: four of the seven builders are conditional on a metadata service and/or a data engine, so on a stripped host those routes 404 because they are NOT MOUNTED, which is a different fact from "they do not exist" — the distinction #2921 was about. Verification: `vitest run apps/console/src/pages/developer` 8/8 across 2 files; eslint on both changed files 0 errors (10 pre-existing warnings, none on touched lines). Data and one string literal — no component or hook logic. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJX6GnuNix7HisBc92THMN
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
Follow-up to #2921, which fixed this page for one server-side builder and listed what it deliberately left out. This is that list. The server-side audit is objectstack-ai/cloud#903.
The finding
#2921 replaced three AI endpoints that had never existed with "the twelve routes
buildAIRoutes()mounts". Correct as far as it went — and it went about half way. The/api/v1/ai/**family is seven builders inservice-aiplus one route mounted byobjectos-runtime. This page showed 12 of 26.Fourteen entries added:
/agents×2,/assistant×3,/tools×2,/pending-actions×4,/evals/runs,/conversations/:id/debug, and/usage.The deep link that could only 404
ToolPreview's "Open in API Console" built:/invokehas never been mounted. The route is/execute(buildToolRoutes). So the single first-party caller of the tool routes sent you to a guaranteed 404 — the same shape as the three dead endpoints #2921 removed from this very page, and it survived that pass because it lives inpackages/app-shell, not in the catalog.Two behavioural details carried over rather than re-learned
stream: falsegeneralises. #2921 found thatPOST /chatstreams unless the body says otherwise, so a JSON-shaped "try it" came back as a wall ofdata:frames throughres.text().POST /agents/:agentName/chatandPOST /assistant/chatare dual-mode on the samestream !== falseflag — verified inagent-routes.tsandassistant-routes.ts— so both templates send it too.Bodies that are actually required.
/tools/:toolName/execute400s without aparametersobject;/evals/runsneedscaseIdand makes real, paid LLM calls underai:admin, which its description now says rather than presenting it as an idle button.Mounting is conditional, and the page says so
Four of the seven builders are gated in
plugin.ts—/agents/*and/assistant/*need a metadata service,/evals/runsalso needs a data engine,/conversations/:id/debugneeds one. A full Cloud deployment wires all of them; a stripped host may not, and there these 404 because they are not mounted, not because they do not exist.That distinction is the whole point of #2921, so it is written down at the top of the group rather than left for whoever hits it.
Worth knowing from the other side
The cloud PR's audit found
/assistant,/assistant/skillsand/assistant/chathave no caller in either repo — no SDK method and nothing in objectui. They are listed here because they are mounted and this page explores raw HTTP; but if the follow-up pass still finds no consumer, retiring the builder is the likelier outcome than three new SDK methods, and these three rows would go with it.Verification
pnpm vitest run apps/console/src/pages/developer— 8/8 across 2 files.turbo run type-check --filter=@object-ui/console --filter=@object-ui/app-shell— 36/36 tasks, clean.eslinton both changed files — 0 errors (10 pre-existing warnings, none on touched lines).🤖 Generated with Claude Code
https://claude.ai/code/session_01WJX6GnuNix7HisBc92THMN
Generated by Claude Code