Skip to content

Fix CI: bump retired Claude model, pin langfuse/litellm, gate Anthropic sampling params - #273

Open
Darkxzie wants to merge 4 commits into
mainfrom
fix/ci-anthropic-sampling-params
Open

Fix CI: bump retired Claude model, pin langfuse/litellm, gate Anthropic sampling params#273
Darkxzie wants to merge 4 commits into
mainfrom
fix/ci-anthropic-sampling-params

Conversation

@Darkxzie

Copy link
Copy Markdown
Collaborator

@

Description

The test (ubuntu-latest, 3.9) job has been failing on main (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 with assert 400 == 200 because of two stacked issues:

  1. Retired model id — tests target claude-opus-4-20250514, which Anthropic no longer serves, so litellm raises NotFoundError. Bumped CLAUDE_MODEL / CLAUDE_ADV_MODEL to claude-opus-4-8.
  2. langfuse/litellm version mismatch — the resolved pair has litellm passing sdk_integration to a Langfuse constructor that no longer accepts it (TypeError). Pinned langfuse<3 and litellm==1.78.0 in tests/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

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have performed a self-review of my own code
  • New unit tests pass locally with my changes
    @

Darkxzie added 3 commits July 20, 2026 19:18
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
Darkxzie force-pushed the fix/ci-anthropic-sampling-params branch from 428ac80 to 208a8bc Compare July 24, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant