feat: strip request params models declare unsupported - #397
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some models reject sampling params the adapters forward unconditionally (#394, #395) — customer requests fail with upstream 400s the relay could prevent. This makes param support capability data, gated once in code:
model.CapabilitiesgainsunsupportedParams(inverted: zero value = everything supported; unknown names inert). Mirrored in the SDK catalog structs;cmd/modelsdev-importnow maps models.dev's explicittemperature: falseinto it (*boolso an absent field is never misread).Spec.ParamPaths(wire locations declared on the Spec literals; samejson.RawMessagetechnique as the model-field rewrite — bodies with nothing to strip pass through byte-identical). The batch runner reuses the strip viainference.StripUnsupportedParams; WS already flows through Dispatch. Proxy mode is deliberately untouched.X-WR-Warnings: dropped_params=…and incrementsrelay_dropped_params_total{param,model}.Fixing a newly drifted model then needs only a catalog data change — no adapter or relay release.
Fixes #394. Fixes #395 (data side: wyolet/relay-catalog#27).