Expand description
Command-line argument definitions and helper functions.
Args is the root Clap struct parsed in main.rs. Helper functions
(resolve_model, validate_model, parse_rate_range, apply_template)
are kept here rather than in main.rs so they can be unit-tested in isolation.
Structs§
Functions§
- apply_
template - Apply template substitution: replace “{input}” with the prompt.
- parse_
rate_ range - Parse “MIN-MAX” rate range string. Returns (min, max) or None on error.
- resolve_
model - Select the appropriate default model for the given provider when the user hasn’t explicitly chosen one (i.e. the model is still the OpenAI default).
- validate_
model - Warn if
modeldoes not match any known model forprovider. Never errors — unknown models are still forwarded to the API.