Fix CI: bump retired Claude model, pin langfuse/litellm, gate Anthropic sampling params - #273
Open
Darkxzie wants to merge 4 commits into
Open
Fix CI: bump retired Claude model, pin langfuse/litellm, gate Anthropic sampling params#273Darkxzie wants to merge 4 commits into
Darkxzie wants to merge 4 commits into
Conversation
Every open PR was failing `test (ubuntu-latest, 3.9)` with a 400 from Anthropic: "`temperature` is deprecated for this model." `call_LLM` built its params with `temperature`, `top_p` and `seed` unconditionally, and the retry re-sent the same params, so the call failed twice and returned 400. Gate those three parameters on the model. Opus 4.7+, Sonnet 5 and Fable 5 reject `temperature`/`top_p`/`top_k` outright, and `seed` is not a Messages API parameter at all. Non-Anthropic models (DeepSeek, OpenAI, Together, Fireworks) keep them, since they route through the same code path. Also: - Pin `langfuse<3` and `litellm==1.78.0` in the test requirements. Unpinned, CI resolved a pair where litellm passes `sdk_integration` to a Langfuse constructor that no longer accepts it, raising a TypeError inside the exception handler that buried the real error. - Move the test models to `claude-opus-4-8`; `claude-opus-4-20250514` is past its published retirement date. - Add non-network regressions covering both sides of the gate, so this stays verifiable without live API calls.
Revert tests/requirements_tests.txt, tests/test_llm.py and tests/variables_test.py to their pre-fix state, and remove the design doc. src/utils/llm.py's accepts_sampling_params() gate is the only change left on this branch.
Pin langfuse<3 and litellm==1.78.0 in tests/requirements_tests.txt so CI stops resolving a version pair where litellm passes an argument Langfuse's constructor no longer accepts. Bump CLAUDE_MODEL and CLAUDE_ADV_MODEL to claude-opus-4-8, since claude-opus-4-20250514 is past its published retirement date.
… src The prior CI fix only bumped the test-variables file, so call_LLM and the other src/ defaults still resolved to claude-opus-4-20250514, which Anthropic has retired. test_llm.py::test_call_llm_success calls call_LLM with no model override and therefore still 404d. Sweep the retired id to claude-opus-4-8 (the same id the adv test already exercises live) everywhere in src/.
Darkxzie
force-pushed
the
fix/ci-anthropic-sampling-params
branch
from
July 24, 2026 15:54
428ac80 to
208a8bc
Compare
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.
@
Description
The
test (ubuntu-latest, 3.9)job has been failing onmain(and therefore on every PR branched off it, e.g. #271) for reasons unrelated to those PRs. This lands the already-staged infra fix.Two live-LLM integration tests (
test_llm.py::test_call_llm_success,test_adv_prompt.py::test_claude_adv_success) fail withassert 400 == 200because of two stacked issues:claude-opus-4-20250514, which Anthropic no longer serves, so litellm raisesNotFoundError. BumpedCLAUDE_MODEL/CLAUDE_ADV_MODELtoclaude-opus-4-8.sdk_integrationto a Langfuse constructor that no longer accepts it (TypeError). Pinnedlangfuse<3andlitellm==1.78.0intests/requirements_tests.txt.Also included: skip Anthropic sampling parameters on models that reject them (
src/utils/llm.py), which the newer models require.Type of change
Checklist
@