feat(api): URL prefix versioning /api/v1 and /api/v2 (#737)#741
Merged
Conversation
π Cora AI Code Reviewβ No issues found. Code looks good! Review powered by cora-cli Β· BYOK Β· MIT |
ajianaz
force-pushed
the
feat/api-versioning-url-prefix
branch
2 times, most recently
from
July 18, 2026 03:12
cd173ba to
188755a
Compare
Adds API versioning middleware to uteke-server.
Changes:
- ApiVersion enum (V1, V2) with path prefix parser
- /api/v1/* routes return v1 format (flat recall results for backward compat)
- /api/v2/* routes return current v2 format (wrapped UnifiedSearchResult)
- Unversioned routes (/recall, /remember, etc.) continue to work (β latest)
- Health endpoint now includes api_versions and api_latest fields
- to_v1_flat() adapter converts UnifiedSearchResult β v1 flat format
v1 vs v2 differences:
- v1 recall: [{id, content, score, namespace, tags, ...}] (flat)
- v2 recall: [{memory: {id, content, ...}, score}] (wrapped)
Routes affected:
- /recall β /api/v1/recall (flat) or /api/v2/recall (wrapped)
- /remember, /memory, /forget, /list, /search, /stats, etc.
- /room/*, /doc/* β all sub-routes versioned
- /health β unversioned, includes version info
ajianaz
force-pushed
the
feat/api-versioning-url-prefix
branch
from
July 18, 2026 03:12
188755a to
2754284
Compare
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.
Summary
Adds URL prefix API versioning to uteke-server so breaking changes can be isolated behind version-specific routes.
Design
Changes
Server (uteke-server)
ApiVersionenum (V1, V2) with path prefix parser/api/v1/*routes β v1 response format (backward compat)/api/v2/*routes β current v2 response formatHealthResponsenow includesapi_versionsandapi_latestto_v1_flat()adapter convertsUnifiedSearchResultβ flat v1 formatv1 vs v2 Response Format
[{id, content, score, namespace, tags}][{memory: {id, content, ...}, score}]Implementation Notes
/recalland/api/v1/recallCloses #737