Repository navigation
Serve a schema under the activity of a model bound to it - #799
tombeckenham wants to merge 1 commit into
Conversation
A Gemini image model binds the shared generateContent route, which is filed under chat, so the record's own _links.schema was a 404. A schema read now resolves under the route's filed activity or under the activity of a model whose stored binding names it; the model-id alias no longer requires the route's activity to equal the model's.
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
A Gemini image model has
activity: imageand binds the sharedv1beta/models/{modelsId}:generateContentroute, which is filed underchat. Schema reads required the URL activity to equal the route's filed activity, so the record's own_links.schemawas a 404.resolveEndpointAlias(src/server/schema-binding.ts) now resolves a route under the activity it is filed under, or under the activity of a model whose storedschemaEndpointIdnames it. The model-id alias (/v1/schemas/gemini/image/<rawId>, andPOST /v1/validatewith a model id) no longer requires the route's activity to equal the model's. An activity no bound model has is still a 404.Not changed:
GET /v1/schemas/gemini/image(the activity map) still lists only routes filed underimage.Test:
src/server/schemas-api.worker.test.ts- direct read, alias read, and the still-404 case.Fixes #755
Summary by CodeRabbit