Agent tool schemas still call /api/v1/tools while a new Function API is ready. How should routes be versioned safely?
Select an answer to reveal the explanation.
Short Explanation
Versioned routes are like keeping the old permit counter open while the new one opens next door—agents move to /api/v2 when their schemas are ready.
Full Explanation
When agent tool schemas still call /api/v1/tools while a new Function API is ready, publish /api/v2/tools routes and keep v1 available until civic agents migrate. Side-by-side versioning lets municipal automations cut over on their schedule without a citywide overnight break, then retire v1 after telemetry shows zero traffic from remaining tool callers.
Overwriting /api/v1 in place with breaking changes and no dual-run window forces silent schema breakage across agents. Deleting v1 immediately on deploy guarantees overnight failures for any tool caller still bound to the old contract. Renaming random path segments weekly destroys stable contracts agents depend on and sabotages regression testing.
Exam caveat: API versioning for HTTP-triggered Functions and agent tools is an operational design skill—additive v2 routes, deprecation windows, and schema updates beat big-bang path rewrites. Pair versioning with contract tests against agent tool manifests before retiring v1.
Operational check: deploy v2 alongside v1, point a canary agent schema at /api/v2/tools while legacy agents remain on v1, compare responses, watch v1 request metrics fall to zero, then remove v1 only after the municipal migration checklist clears.