feat(providers): support OpenRouter request parameters#9276
feat(providers): support OpenRouter request parameters#9276sunilkumarvalmiki wants to merge 1 commit into
Conversation
DOsinga
left a comment
There was a problem hiding this comment.
Eh, actually can you rework this to not duplicate the existing request_params infrastructure? ModelConfig.request_params already gets merged into the OpenAI-compatible payload by create_request() in formats/openai.rs — so the simpler approach is to parse OPENROUTER_PARAMETERS in from_env() and feed it into model_config.request_params there. That way you don't need the apply_openrouter_parameters function, the extra field on the provider struct, or the second merge path with subtly different collision semantics (or_insert vs the existing insert-with-reserved-key-check). Most of the tests can go too since they're just testing serde_json basics.
Signed-off-by: sunilkumarvalmiki <g.sunilkumarvalmiki@gmail.com>
33037fb to
bfcc03a
Compare
|
Reworked this to use the existing Local checks run:
|
|
@DOsinga The requested rework is pushed and CI is green now. Could you take another look when you have a chance? |
Resolves #8646.
Summary
OPENROUTER_PARAMETERSprovider config.verbosity,reasoning, andplugins.Testing
cargo fmt --all --checkcargo check -p goose --no-default-features --features rustls-tls,local-inference --libCARGO_BUILD_JOBS=1 cargo test -p goose --no-default-features --features rustls-tls,local-inference --lib openrouter_parameters