api_url fallback #24129
poetinger
started this conversation in
Feature Ideas / Enhancements
api_url fallback
#24129
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I took a look around the issues and haven't seen this request yet, nor do I know if anybody has a use case similar to mine. I have just forked the project to see if I can add it myself whenever I get some spare time to do so, but in the mean time I will open this and hope somebody has some recommendation or pointers before I get started.
The (dreaded) user stories:
A super fast peek and
ripgrep
through the codebase, I can see thatapi_url
is currently handled as just a&str
, and the connection attempts are bubbled immediately on HTML error responses. I can envision two different solutions to my problems:api_url
setting aVec
and treat all listedapi
s as one glob. This would run into the issue of which model belongs to which api though, requiring extra work to ensure requests are sent to the correct server.api_url
is unreachable, use thefallback_url
and bubble its errors instead. This does not solve the first user story, but the second is much more important for my daily usage as it also handles the case where there are multiple servers in one LAN, and I can shutdown the primary as needed.I'm leaning toward the second solution, but I am curious if this has been considered by anybody else? Hoping this becomes my daily driver!
Beta Was this translation helpful? Give feedback.
All reactions