fix(console): the API console's AI group lists the routes that exist (framework#3718) - #2921
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
…(framework#3718) `/nlq`, `/suggest` and `/insights` sat in the developer API console's AI catalog with "try it" bodies and always 404'd. They came from the framework's `DEFAULT_AI_ROUTES` — a registration table with no runtime consumer — and were never implemented in any repo. framework#3718 deleted the declarations and the three dead `client.ai.*` methods that built the same URLs; this removes the last place a user could click them. The AI group now mirrors the twelve routes `buildAIRoutes()` mounts, in table order, adding the four the catalog never had: `GET /conversations/:id`, `PATCH /conversations/:id`, and the two console-facing diagnostics `GET /status` and `GET /effective-model`. Those two are deliberately not SDK surface, which is precisely why they belong on a page that explores raw HTTP rather than `client.*`. `POST /chat` streams unless the body says otherwise, so its template now sends `stream: false` — without it, "try it" buffers an SSE body as text under a JSON-shaped request. `/chat/stream` keeps the streaming template. The audited table lives in cloud's `packages/service-ai/src/ai-route-ledger.ts`, next to the routes; a comment here points at it. No test is added: this repo has no way to verify an AI URL resolves — service-ai is mounted from another repo — and a test that pins this list to a copy of itself would be the same kind of evidence-free assertion that let the three dead endpoints sit here unnoticed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJX6GnuNix7HisBc92THMN
os-zhuang
force-pushed
the
claude/ai-namespace-unreachable-0qbyx2
branch
from
July 28, 2026 11:47
014ab56 to
1deecec
Compare
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 28, 2026 11:53
os-zhuang
added a commit
that referenced
this pull request
Jul 28, 2026
… preview stops linking to a 404 (framework#3718) (#2925) #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. Claude-Session: https://claude.ai/code/session_01WJX6GnuNix7HisBc92THMN Co-authored-by: Claude <noreply@anthropic.com>
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.
The last piece of objectstack-ai/objectstack#3718, and the only user-visible one. The framework half landed in objectstack-ai/objectstack#3840, the guard half in objectstack-ai/cloud#902.
The finding
The developer API console offered three AI endpoints that have never existed:
Each came with a "try it" body template, so this page didn't merely document them — it invited you to send one. They were declared in the framework's
DEFAULT_AI_ROUTES(a registration table with no runtime consumer) and typed as optional protocol methods nothing implemented; framework#3840 deleted the declarations and the three deadclient.ai.*methods that built the same URLs. This removes the last surface a user could click them from.What the AI group is now
The twelve routes
buildAIRoutes()actually mounts, in table order:Four were missing rather than wrong:
GET /conversations/:idandPATCH /conversations/:id— mounted since the conversations family landed; the catalog listed create/list/addMessage/delete and skipped read and update.GET /statusandGET /effective-model— deliberately not SDK surface (cloud's ledger marks bothserver-only: adapter provenance and per-env model resolution, operator diagnostics). That is exactly why they belong here: this page explores raw HTTP, notclient.*, and the console is the audience those two were written for.One behavioral fix:
POST /chatstreams unless the body says otherwise. Its template now sendsstream: false, so "try it" gets the JSON reply the panel renders. Without it the request comes backtext/event-streamandApiConsolePagebuffers the whole SSE body throughres.text()— a JSON-shaped request producing a wall ofdata:frames./chat/streamkeeps the streaming template; it is the one that means it.Where truth lives
The audited table is cloud's
packages/service-ai/src/ai-route-ledger.ts, next to the routes it describes, and cloud#902 drives everyai.*SDK method against it. A comment in this file points there and asks that a route added or renamed in that table be mirrored here.No test is added, deliberately. This repo cannot verify an AI URL resolves —
service-aiis mounted from another repo, and nothing in the console's test environment answers/api/v1/ai/*. A test pinning this list to a hardcoded copy of itself would assert only that the catalog equals the catalog. That is the same evidence-free shape as the framework client tests framework#3840 replaced — they mockedfetch, asserted the URL the client built, and passed for years against endpoints that did not exist. The three dead entries removed here sat directly under such coverage.Verification
pnpm vitest run apps/console/src/pages/developer— 8/8 across 2 files.eslinton the changed file — 0 errors (8 pre-existing warnings, untouched by this diff).pnpm type-check --filter=@object-ui/console— green.Not in this PR
The other
/api/v1/ai/*builders inservice-ai—agents,tools,assistant,pending-actions,evals,conversations/:id/debug— are real mounted routes this catalog has never listed. They sit outside thebuildAIRoutes()table that #3718 audited, and several are gated differently; adding them unaudited would be guessing rather than the opposite of guessing. Worth its own pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01WJX6GnuNix7HisBc92THMN
Generated by Claude Code