Skip to content

test: allow /v1/messages in supported_endpoints schema - #32742

Draft
cursor[bot] wants to merge 1 commit into
litellm_internal_stagingfrom
cursor/ci-autofix-automation-c799
Draft

test: allow /v1/messages in supported_endpoints schema#32742
cursor[bot] wants to merge 1 commit into
litellm_internal_stagingfrom
cursor/ci-autofix-automation-c799

Conversation

@cursor

@cursor cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Relevant issues

Linear ticket

Pre-Submission checklist

  • I have added meaningful tests
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Screenshots / Proof of Fix

Before the fix, misc / Run tests fails on every PR based on litellm_internal_staging with:

FAILED tests/test_litellm/test_utils.py::test_aaamodel_prices_and_context_window_json_is_valid - jsonschema.exceptions.ValidationError: '/v1/messages' is not one of ['/v1/responses', '/v1/embeddings', '/v1/chat/completions', '/v1/completions', '/v1/images/generations', '/v1/realtime', '/v1/realtime/transcription_sessions', '/v1/images/variations', '/v1/images/edits', '/v1/batch', '/v1/audio/transcriptions', '/v1/audio/speech', '/v1/ocr', '/vertex_ai/live', '/v1/realtime/transcription_sessions']

On instance['meta/muse-spark-1.1']['supported_endpoints'][2]:
    '/v1/messages'

Example failure: https://github.com/BerriAI/litellm/actions/runs/29074129118/job/86301878406

Local reproduction of just the schema validation, at commit 6318c7ee3c (with the enum patch applied):

$ python3 -c "
import json
from jsonschema import validate
with open('model_prices_and_context_window.json') as f:
    data = json.load(f)
data.pop('sample_spec', None)
data.pop('fallback_generalizations', None)
with open('tests/test_litellm/test_utils.py') as f:
    src = f.read()
start = src.index('INTENDED_SCHEMA = {')
i = src.index('{', start); depth = 0; begin = i
while i < len(src):
    if src[i] == '{': depth += 1
    elif src[i] == '}':
        depth -= 1
        if depth == 0:
            end = i + 1; break
    i += 1
schema = eval(src[begin:end], {'True': True, 'False': False, 'None': None})
validate(data, schema)
print('OK: schema validation passed')
"
OK: schema validation passed

Without the patch the same script raises the same ValidationError seen in CI.

Type

✅ Test

Changes

meta/muse-spark-1.1 (added in #32701) legitimately declares /v1/messages under supported_endpoints because LiteLLM routes that model through its Anthropic Messages transformation, but the JSON-schema enum in test_aaamodel_prices_and_context_window_json_is_valid was never updated, so the misc / Run tests shard fails on every open PR rebased onto litellm_internal_staging. Added /v1/messages to the enum; /v1/messages is already a first-class LiteLLM endpoint (litellm/main.py, litellm/utils.py, tencent + openai_like messages/transformation.py, proxy pre-call utils, etc.), so no other data or code changes are needed.

Open in Web View Automation 

The muse-spark-1.1 model (added in #32701) declares /v1/messages
in its supported_endpoints, but the JSON-schema enum in
test_aaamodel_prices_and_context_window_json_is_valid was not updated,
so the misc test shard fails on every PR based on
litellm_internal_staging. Add /v1/messages (a first-class LiteLLM
endpoint used by the Anthropic Messages surface) to the enum.

Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed-hq

codspeed-hq Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing cursor/ci-autofix-automation-c799 (6318c7e) with litellm_internal_staging (2a12707)

Open in CodSpeed

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.

2 participants