[v0.7 CLI Refactor] Rework BackendArgs to be the authoritative config location #723
Conversation
Signed-off-by: Samuel Monson <smonson@redhat.com> Assisted-by: Copilot <GPT-4.1>
Signed-off-by: Samuel Monson <smonson@redhat.com> Assisted-by: Copilot <GPT-4.1>
Signed-off-by: Samuel Monson <smonson@redhat.com> Assisted-by: Copilot <GPT-4.1>
Signed-off-by: Samuel Monson <smonson@redhat.com> Generated-by: claude-code <Sonnet 4.6>
567812b to
cc2a59f
Compare
Signed-off-by: Samuel Monson <smonson@redhat.com>
|
sigh Fix one CI job and break another. I will have a fix up for the tests soon. |
Signed-off-by: Samuel Monson <smonson@redhat.com> Generated-by: claude-code <Sonnet 4.6>
|
augment review |
🤖 Augment PR SummarySummary: This PR continues the v0.7 CLI/internal refactor by making Changes:
Technical Notes: Polymorphic backend args are now validated via the registry/tagged-union mechanism, and backend configuration is intended to be transported/serialized as a single object for spawning and submodule configuration. 🤖 Was this summary useful? React with 👍 or 👎 |
Signed-off-by: Samuel Monson <smonson@redhat.com>
dbutenhof
left a comment
There was a problem hiding this comment.
I pulled it and tried various good and bad option values e.g. for the backend args, and all seems to work, which is one definition of "good".
Signed-off-by: Samuel Monson <smonson@redhat.com> Generated-by: claude-code Sonnet 4.6
|
Forgot I was going to use this chance to move |
jaredoconnell
left a comment
There was a problem hiding this comment.
Looks good to me. I tested basic use cases with the HTTP and vLLM-Python backend.
|
This looks ready to merge. I have no further comments after seeing your responses. |
Changed my mind about this. I'll do it in a follow-up after #713 lands since that PR adds a common file which will make it easier to move. |
Summary
Reworks
BackendArgsinto aPydanticClassRegistrycontaining everything needed to create a backend.Details
This is the first (or third depending on how you count) patch to refactor our CLI and the internal way submodules are configured and spawned. Since we already had a partial base for it this will likely be the simplest PR and subsequent PRs will have to rework a lot more code.
Changes to the entrypoints and CLI are temporary as that code will be refactored in a follow-up.
Changes
I tried to keep most of the original functionality but there were a few things that just did not make sense as implemented or were planned for removal:
Dropped
LEGACY_API_ALIASESThey only exist to keep existing scripts from breaking and this release those scripts will break for other reasons so might as well make the change now.
Dropped
request_handlersbackend argumentThis let the user provide custom request type handlers as a backend argument. The better way to do this is to just call
OpenAIRequestHandlerFactory.registeron your custom handler.validate_backendno longer has the option to provide a custom health check endpointYou can get nearly the same functionality by passing
api_routes={"/health": "custom endpoint"}. However users usually just setvalidate_backend=Falsesince its too much of a hassle to provide a custom endpoint.Test Plan
Test setting
--backendand--backend-kwargswith various values to make sure nothing has changed (except for exceptions detailed below).Related Issues
backendsandbenchmark#725Use of AI
## WRITTEN BY AI ##)