devflowinc / trieve

All-in-one infrastructure for building search, recommendations, and RAG. Trieve combines search language models with tools for tuning ranking and relevance.
https://dashboard.trieve.ai
Other
1.2k stars 111 forks source link

feature: api versioning #1753

Open densumesh opened 4 days ago

densumesh commented 4 days ago

Description

We want to be able to version the API so that we can push breaking changes to users in a safe way. This should be accomplished by adding a new X-API-Version header that can be set to 1 or 2. We should also switch users onto the new api version if they create a new organization after this PR gets merged.

This PR should just create the underlying code to add the header and versioning logic, as well as update the clients to use the new version.

We need to then complete this issue:

Target(s)

server, chat, search

Requirement to close

### Community channels Matrix is preferred. Reach out on discord or Matrix for further assistance. - [discord](https://discord.gg/CuJVfgZf54) - [matrix](https://matrix.to/#/#trieve-general:matrix.zerodao.gg)
skeptrunedev commented 3 days ago

If unspecified, orgs created before a certain date should default to version 1 and orgs after a certain date should default to 2.