mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-29 01:42:19 +00:00
* refactor(ocr): remove the Python OCR execution path and require the Rust route Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fmt * refactor(ocr): tidy the native OCR passthrough binding Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * style(ocr): ruff format the azure passthrough transformation Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * refactor(ocr): resolve passthrough OCR costing in one Rust call Replace passthrough_url/passthrough_transform with passthrough_response, which matches the relayed endpoint against each Azure config's path segments instead of building a fake request to call get_complete_url. The binding drops the unused headers, status and api_base arguments. Catch the ValueError/RuntimeError the binding raises so a relayed body that is not OCR-shaped falls back to the passthrough object instead of failing logging, and cover the relay against the real binding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(ocr): drop the unused LlmProviders import from health check helpers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: drop the ocr_testing job now that tests/ocr_tests is gone Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(ocr): restore the live OCR matrix and the ocr_testing job The public litellm.ocr / aocr / Router interface is unchanged by the Rust migration, so the live provider matrix still applies. Drops the stale VCR skip list for the deleted test_rust_bridge.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(ocr): import Final in the health check helper tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Yujong Lee <yujong@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
96 lines
2.9 KiB
Python
96 lines
2.9 KiB
Python
from pathlib import Path
|
|
from typing import Final
|
|
|
|
from ...shared.reporting.models import SURFACES
|
|
from ...shared.reporting.strategy import (
|
|
CaseDefinition,
|
|
ModuleCaseSpec,
|
|
NotImplementedCaseSpec,
|
|
StrategyDefinition,
|
|
)
|
|
from .reporting import render_e2e_results
|
|
from .runner import run_e2e_cases
|
|
|
|
CASES: Final[tuple[CaseDefinition, ...]] = (
|
|
CaseDefinition(
|
|
"ocr",
|
|
NotImplementedCaseSpec(reason="OCR has no Python implementation left to compare against."),
|
|
surface="sdk",
|
|
),
|
|
CaseDefinition(
|
|
"messages",
|
|
NotImplementedCaseSpec(
|
|
reason="Bridge unit tests exist, but no standalone end-to-end parity case is registered."
|
|
),
|
|
surface="sdk",
|
|
),
|
|
CaseDefinition(
|
|
"responses",
|
|
NotImplementedCaseSpec(
|
|
reason="Bridge unit tests exist, but no standalone end-to-end parity case is registered."
|
|
),
|
|
surface="sdk",
|
|
),
|
|
CaseDefinition(
|
|
"count_tokens",
|
|
NotImplementedCaseSpec(reason="No Rust count_tokens parity test is present yet."),
|
|
surface="sdk",
|
|
),
|
|
CaseDefinition(
|
|
"chat_completions",
|
|
NotImplementedCaseSpec(
|
|
reason="Bridge unit tests exist, but no standalone end-to-end parity case is registered."
|
|
),
|
|
surface="sdk",
|
|
),
|
|
CaseDefinition(
|
|
"transcription",
|
|
NotImplementedCaseSpec(
|
|
reason="Bridge unit tests exist, but no standalone end-to-end parity case is registered."
|
|
),
|
|
surface="sdk",
|
|
),
|
|
CaseDefinition(
|
|
"ocr",
|
|
NotImplementedCaseSpec(reason="No gateway end-to-end OCR parity case is registered."),
|
|
surface="gateway",
|
|
),
|
|
CaseDefinition(
|
|
"messages",
|
|
NotImplementedCaseSpec(reason="No gateway end-to-end Messages parity case is registered."),
|
|
surface="gateway",
|
|
),
|
|
CaseDefinition(
|
|
"responses",
|
|
NotImplementedCaseSpec(reason="No gateway end-to-end Responses parity case is registered."),
|
|
surface="gateway",
|
|
),
|
|
CaseDefinition(
|
|
"count_tokens",
|
|
NotImplementedCaseSpec(reason="No gateway end-to-end token-count parity case is registered."),
|
|
surface="gateway",
|
|
),
|
|
CaseDefinition(
|
|
"chat_completions",
|
|
NotImplementedCaseSpec(reason="No gateway end-to-end chat parity case is registered."),
|
|
surface="gateway",
|
|
),
|
|
CaseDefinition(
|
|
"transcription",
|
|
NotImplementedCaseSpec(reason="No gateway end-to-end transcription parity case is registered."),
|
|
surface="gateway",
|
|
),
|
|
)
|
|
|
|
STRATEGY: Final = StrategyDefinition(
|
|
id="e2e_parity",
|
|
order=10,
|
|
label="End-to-end parity",
|
|
description="Compare observable Python and Rust behavior over generated and recorded inputs.",
|
|
directory=Path(__file__).parent,
|
|
runnable_spec=ModuleCaseSpec,
|
|
cases=CASES,
|
|
run=run_e2e_cases,
|
|
render=render_e2e_results,
|
|
surfaces=SURFACES,
|
|
)
|