Skip to content

fix(ci): make litellm_internal_staging green (logging_testing + Bedrock Opus) - #29341

Closed
mateo-berri wants to merge 2 commits into
litellm_internal_stagingfrom
claude/focused-allen-QifiT
Closed

fix(ci): make litellm_internal_staging green (logging_testing + Bedrock Opus)#29341
mateo-berri wants to merge 2 commits into
litellm_internal_stagingfrom
claude/focused-allen-QifiT

Conversation

@mateo-berri

@mateo-berri mateo-berri commented May 30, 2026

Copy link
Copy Markdown
Contributor

Relevant issues

litellm_internal_staging CI was red. GitHub Actions was fully green (75/75), but the CircleCI build_and_test workflow on staging HEAD (f11c12d, pipeline #79824) had two failing jobs: logging_testing and llm_translation_testing. This PR fixes both.

What this fixes

1. logging_testing.

#28909 hardened log_db_metrics to emit a minimal, non-sensitive event_metadata (only table_name when present, otherwise None) instead of dumping function_name, function_kwargs, and function_args onto the span; the function name still rides on the separate call_type argument. test_log_db_redis_services.py was not updated and still asserted "function_name" in event_metadata, so on the no-table_name path event_metadata is None and the assertion raised TypeError: argument of type 'NoneType' is not iterable.

This updates test_log_db_metrics_success to assert event_metadata is None for that path and adds test_log_db_metrics_event_metadata_is_safe, a regression guard that only the table name surfaces and that sensitive kwargs (tokens, prisma client) are never dumped.

2. llm_translation_testing.

All 8 failures were test_reasoning_effort_grid[bedrock_converse-bedrock-claude-opus-4-7-*] with BedrockException - {"message":"anthropic.claude-opus-4-7 is not available for this account..."}. The revert in #29326 dropped the grid_spec fail_reason xfail workaround for the unentitled Opus cells on the assumption that the reactivated Bedrock account (888602223428) has flagship Opus. Live Bedrock converse calls with that account (in both us-east-1 and us-west-2) confirm us.anthropic.claude-opus-4-6-v1 works but us.anthropic.claude-opus-4-7 returns "not available for this account", so opus-4-7 is genuinely unentitled there and access "requires an AWS Sales request, not self-serve". The CircleCI AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY already point at 888602223428, so no credential rotation was needed.

This restores the ModelEntry.fail_reason field and the pytest.xfail consumer, and marks the bedrock-claude-opus-4-7 cell xfail (account reference updated to 888602223428). The 8 cells now xfail (loud and documented) instead of failing the suite; remove the fail_reason once opus-4-7 access is granted.

Stacked PR

#29327 (Opus 4.8 reasoning-effort grid) depends on the fail_reason mechanism this PR restores, so it has been rebased to branch off this PR. Its opus-4-8 Azure/Vertex/Bedrock cells use the same xfail guard, with the Bedrock account reference aligned to 888602223428.

Pre-Submission checklist

  • I have added meaningful tests
  • My PR passes all unit tests
  • My PR's scope is as isolated as possible
  • I have requested a Greptile review

Proof of Fix

This is a CI-only test fix; the proof is the two previously-red CircleCI jobs turning green. Before (staging HEAD pipeline #79824, jobs 1743867 / 1743865):

FAILED tests/logging_callback_tests/test_log_db_redis_services.py::test_log_db_metrics_success
  - TypeError: argument of type 'NoneType' is not iterable     (1 failed, 343 passed)

FAILED tests/llm_translation/reasoning_effort_grid/...::test_reasoning_effort_grid[bedrock_converse-bedrock-claude-opus-4-7-*]
  - BedrockException ... "anthropic.claude-opus-4-7 is not available for this account"   (8 failed)

After (this branch, locally, with the CI Bedrock creds for the xfail path):

tests/logging_callback_tests/test_log_db_redis_services.py ... 10 passed (1 DD_API_KEY-gated test passes in CI)
reasoning_effort_grid ... bedrock opus-4-7 cells xfailed (no live call; pytest.xfail raises first)

The CircleCI run on this PR is the live proof for both jobs.

Type

🐛 Bug Fix
✅ Test

Changes

tests/logging_callback_tests/test_log_db_redis_services.py: align event_metadata assertions with the redacted contract from #28909 and add a redaction regression test.

tests/llm_translation/reasoning_effort_grid/grid_spec.py and test_reasoning_effort_grid.py: restore the ModelEntry.fail_reason field and pytest.xfail consumer, and mark the unentitled bedrock-claude-opus-4-7 cell xfail (account 888602223428).

…edaction

PR #28909 hardened log_db_metrics to emit a minimal, non-sensitive
event_metadata (only table_name when present, otherwise None) instead of
dumping function_name, function_kwargs, and function_args onto the span. The
test in test_log_db_redis_services was not updated and still asserted
"function_name" in event_metadata, which raised TypeError (argument of type
'NoneType' is not iterable) and turned the logging_testing CI job red on
litellm_internal_staging.

Update test_log_db_metrics_success to assert event_metadata is None when no
table_name is passed, and add test_log_db_metrics_event_metadata_is_safe as a
regression guard verifying that only the table name surfaces and that sensitive
kwargs (tokens, prisma client) are never dumped.
@codecov

codecov Bot commented May 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…count

#29326 (the Bedrock CI account revert) dropped the grid_spec fail_reason
workaround for the unentitled opus-4-7 cells, on the assumption that the
reactivated account 888602223428 has flagship Opus. A live Bedrock converse call
to us.anthropic.claude-opus-4-7 with that account (both us-east-1 and us-west-2)
returns "anthropic.claude-opus-4-7 is not available for this account", while
opus-4-6-v1 succeeds; the credentials are valid and only opus-4-7 is unentitled
(access requires an AWS Sales request, not self-serve). The dropped workaround
turned the 8 opus-4-7 cells red in llm_translation_testing on
litellm_internal_staging.

Restore the ModelEntry.fail_reason field and the pytest.xfail consumer, and mark
the bedrock-claude-opus-4-7 cell xfail with the account reference updated to
888602223428. The cells now xfail (loud and documented) instead of failing the
suite; remove the fail_reason once opus-4-7 access is granted.
@mateo-berri

Copy link
Copy Markdown
Contributor Author

Superseded by #29344. Same two commits, moved to the litellm_fix_staging_ci branch so the CircleCI build_and_test branch filter (only: main, /litellm_.*/) actually runs the suite; this claude/ branch is skipped by CircleCI. Closing in favor of #29344.


Generated by Claude Code

@mateo-berri
mateo-berri deleted the claude/focused-allen-QifiT branch May 30, 2026 19:31
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