Repository navigation
SWF(bug): reject out-of-range chat penalties - #71
Merged
Merged
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
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.
Summary
Chat completions now return HTTP 400 for a supplied presence or frequency penalty outside the inclusive range
[-2, 2], matching legacy completions.Root cause: Chat validated only the resolved penalties after prompt setup.
ATLAS_FORCE_TEMP_ZEROcan replace the supplied values with zero before that check. Validate the original request up front and keep the resolved-value check for model presets.Test plan
Try it (CPU, with
bash scripts/ci_gpu_stubs.shrun once):ATLAS_SKIP_BUILD=1 CUDARC_CUDA_VERSION=13000 cargo test -p spark-server --bin spark sampling_penalty_rangessampling_penalty_ranges ... FAILED—presence_penalty=-2.1 should be rejected.sampling_penalty_ranges ... ok— both fields reject values below and above the limits with HTTP 400 and the matchingerror.param; both endpoints are accepted.3253 passed; 0 failed; 14 ignored(cargo test -p spark-server --bin sparkwith the same environment).cargo fmt --all -- --checkATLAS_SKIP_BUILD=1 CUDARC_CUDA_VERSION=13000 cargo clippy --workspace --tests(CI command)bash scripts/check-license-headers.sh,python3 scripts/check_spdx.py, andtyposCLA
Implemented in session Validate chat presence and frequency penalty ranges
Review with Devin · Open in Devin Desktop