litellm/.github
Joshua Wang 2754da5391
fix(friendliai): drop litellm-internal message fields before sending (#45092)
* fix(friendliai): drop litellm-internal assistant fields before sending

Claude Code replays thinking blocks on every turn after the first. The
Anthropic adapter turns them into thinking_blocks plus reasoning_content
on the chat assistant message, and FriendliAI rejects any message key it
does not know, so multi-turn Claude Code sessions on friendliai/ models
failed with a 500 after the first tool call

FriendliAI accepts reasoning_content and GLM reads it back, so only
thinking_blocks and provider_specific_fields are dropped. together_ai
already had this exact helper as a private function, so it moves to
common_utils next to strip_litellm_internal_message_fields and both
providers share it

Related to #32188

* test(friendliai): cover a replayed tool call turn

The regression fixture is now the shape Claude Code replays after a tool
call: an assistant turn with thinking_blocks, tool_calls and no content,
followed by the matching tool result. The test asserts both survive the
sync and async request paths unchanged

* ci: retrigger checks

* ci: retrigger benchmarks after runner timeout

* chore(friendliai): mark inherited list signatures as mutable-ok

The type-discipline gate on main now caps LIT001 at the merge-base count,
so the _transform_messages overloads need the same inherited-contract
marker together_ai uses for its identical override

* ci(test-unit): add tests/unit/llms/friendliai to the llms-providers shard

* test(friendliai): check the outbound FriendliAI body through the proxy for chat and messages replays

Both replay shapes go through a real proxy to a scripted FriendliAI upstream, and the test reads the
request body FriendliAI received. It fails at the merge base, where thinking_blocks and
provider_specific_fields reach the upstream, and passes with the field stripping in place.

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-10-20 01:22:07 +00:00
..
actions ci: split slow unit shards and build the Rust bridge once per run (#44622) 2026-10-05 23:43:01 +00:00
assets/scaledown feat(scaledown): add native text provider support (#44168) 2026-10-10 14:01:17 -07:00
codeql ci(codeql): run the default suite on full scans and security-extended on PRs (#45149) 2026-10-07 13:24:28 -07:00
e2e-stack test(mcp): replace the live Linear MCP OAuth e2e tests with integration coverage (#47154) 2026-10-17 14:29:59 -07:00
ISSUE_TEMPLATE ci: classify new issues into domain, provider, kind, priority and lift labels 2026-09-18 11:37:55 -07:00
observatory Add observatory test workflow for RC/stable releases 2026-03-01 15:30:09 -03:00
prompts ci: classify new issues into domain, provider, kind, priority and lift labels 2026-09-18 11:37:55 -07:00
PULL_REQUEST_TEMPLATE chore: drop Greptile from the PR template, AGENTS.md and CI (#46013) 2026-10-12 18:32:39 +00:00
screenshots fix(team_endpoints): auto-add SSO team members to org on move (proxy admin only) (#26377) 2026-04-24 08:36:25 -07:00
scripts docs(agents): keep directory rules in nested AGENTS.md and pin integration tests to CircleCI (#46796) 2026-10-16 14:57:49 -07:00
workflows fix(friendliai): drop litellm-internal message fields before sending (#45092) 2026-10-20 01:22:07 +00:00
ci-coverage-allowlist.yml test: migrate legacy unit dirs and unrun folders into tests/unit, tests/integration and tests/e2e (#45940) 2026-10-11 06:24:57 -07:00
CODEOWNERS chore: add yassin-berriai as code owner for helm/ and terraform/ (#47452) 2026-10-20 00:38:01 +00:00
dependabot.yaml chore: fixes 2026-04-05 01:30:57 -07:00
deploy-on-aws.png feat: add LiteLLM Rust workspace with Mistral OCR bridge (#31033) 2026-06-23 13:16:47 -07:00
deploy-on-gcp.png feat: add LiteLLM Rust workspace with Mistral OCR bridge (#31033) 2026-06-23 13:16:47 -07:00
deploy-to-aws.png Add files via upload 2023-10-25 16:33:53 -07:00
FUNDING.yml Update FUNDING.yml 2023-09-22 09:51:35 -07:00
issue-labels.json ci(issue-classifier): name every workflow, script and job after the issue it works on 2026-09-18 11:37:55 -07:00
mutmut-coverage.rc fix(ci): let the mutation workflow find covered lines so it generates mutants 2026-08-25 23:16:40 -07:00
template.yaml fix(proxy): drop legacy telemetry key from persisted WORKER_CONFIG before initialize 2026-09-20 03:14:11 +00:00