Repository navigation
feat(cli): add models overrides subcommand - #7990
Conversation
houko
left a comment
There was a problem hiding this comment.
Merging — the command is wired into main.rs, the three routes it calls exist in routes/providers.rs, and the i18n gates are updated.
Two non-blocking notes for whenever you next touch this file.
--clear silently discards a value set in the same invocation.
librefang models overrides gpt-4o --clear --context-window 131072 returns after the DELETE and never sends the PUT, so the operator gets "Overrides cleared" and a context window that is not what they just typed.
#[arg(long, conflicts_with_all = ["context_window", "max_output_tokens"])] on clear turns that into a clap error at parse time.
The set path is a read-modify-write against the daemon: GET, mutate the object in memory, PUT the whole thing back.
Two concurrent models overrides calls, or one racing a dashboard edit, will have the later PUT overwrite the earlier one's field rather than merge with it.
Given how this is used interactively that is unlikely to bite, but if the route grows a PATCH it is the better verb here.
Summary
librefang models overrides <model>CLI subcommand to view, set, and clear per-model inference parameter overrides (context_window, max_output_tokens)GET/PUT/DELETE /api/models/overrides/{id}) — this PR adds the missing CLI surfaceVerification
cargo check -p librefang-clipasses