ooai_llm.benchmarks.livecodebench_pro¶
Exploratory LiveCodeBench Pro leaderboard client.
- Purpose:
Provide typed, read-only access to the public LiveCodeBench Pro leaderboard surfaces currently used by the project website.
- Design:
Keep this module explicitly best-effort: the backend endpoints are discoverable from the public frontend but are not documented as a stable API contract.
Use only the Python standard library for HTTP so the package does not gain a required network-client dependency.
Normalize the useful result shapes while allowing extra fields because the upstream payload may evolve.
Examples
>>> from ooai_llm.benchmarks.livecodebench_pro import LiveCodeBenchProModel
>>> row = LiveCodeBenchProModel(name="gpt-5", provider="openai", rating=2176)
>>> row.label
'gpt-5'
Attributes¶
Exceptions¶
Raised when LiveCodeBench Pro data cannot be fetched or parsed. |
Classes¶
Document one known LiveCodeBench Pro endpoint. |
|
One rating event from the LiveCodeBench Pro leaderboard. |
|
One model row from the LiveCodeBench Pro leaderboard. |
|
One per-difficulty row with validation and pass rates. |
|
Per-difficulty leaderboard payload. |
|
One problem verdict for a model submission set. |
|
One contest grouping in a model submission set. |
|
Contest/problem verdicts for one model and difficulty. |
|
Individual submission detail including generated code when exposed. |
|
High-level snapshot of leaderboard rows and difficulty views. |
|
Small client for the current LiveCodeBench Pro leaderboard backend. |
Functions¶
Return the currently known LiveCodeBench Pro endpoint surfaces. |
|
Return LiveCodeBench Pro model rows using a default client. |
|
Return a LiveCodeBench Pro per-difficulty result using a default client. |
|
Return LiveCodeBench Pro contest/problem verdicts using a default client. |
|
Return one LiveCodeBench Pro submission detail using a default client. |
|
|
Return a high-level LiveCodeBench Pro snapshot using a default client. |
Module Contents¶
- ooai_llm.benchmarks.livecodebench_pro.DEFAULT_LIVECODEBENCH_PRO_BASE_URL = 'https://webhook.cp-bench.orzzh.com'[source]¶
- exception ooai_llm.benchmarks.livecodebench_pro.LiveCodeBenchProError[source]¶
Bases:
RuntimeErrorRaised when LiveCodeBench Pro data cannot be fetched or parsed.
- class ooai_llm.benchmarks.livecodebench_pro.LiveCodeBenchProEndpoint(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelDocument one known LiveCodeBench Pro endpoint.
- Parameters:
name – Stable local label for the endpoint.
method – HTTP method.
path – Backend path.
description – What the endpoint currently returns.
query – Required or useful query parameters.
stability – Stability note for callers.
- class ooai_llm.benchmarks.livecodebench_pro.LiveCodeBenchProRatingEvent(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelOne rating event from the LiveCodeBench Pro leaderboard.
- class ooai_llm.benchmarks.livecodebench_pro.LiveCodeBenchProModel(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelOne model row from the LiveCodeBench Pro leaderboard.
- model_config[source]¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- rating_events: list[LiveCodeBenchProRatingEvent] = None[source]¶
- class ooai_llm.benchmarks.livecodebench_pro.LiveCodeBenchProDifficultyRow(/, **data: Any)[source]¶
Bases:
LiveCodeBenchProModelOne per-difficulty row with validation and pass rates.
- class ooai_llm.benchmarks.livecodebench_pro.LiveCodeBenchProDifficultyResult(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelPer-difficulty leaderboard payload.
- model_config[source]¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- difficulty: LiveCodeBenchProDifficulty[source]¶
- llms: list[LiveCodeBenchProDifficultyRow] = None[source]¶
- class ooai_llm.benchmarks.livecodebench_pro.LiveCodeBenchProProblemResult(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelOne problem verdict for a model submission set.
- class ooai_llm.benchmarks.livecodebench_pro.LiveCodeBenchProContestResult(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelOne contest grouping in a model submission set.
- model_config[source]¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- problems: list[LiveCodeBenchProProblemResult] = None[source]¶
- class ooai_llm.benchmarks.livecodebench_pro.LiveCodeBenchProSubmissionsResult(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelContest/problem verdicts for one model and difficulty.
- model_config[source]¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- difficulty: LiveCodeBenchProDifficulty[source]¶
- contests: list[LiveCodeBenchProContestResult] = None[source]¶
- class ooai_llm.benchmarks.livecodebench_pro.LiveCodeBenchProSubmissionDetail(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelIndividual submission detail including generated code when exposed.
- class ooai_llm.benchmarks.livecodebench_pro.LiveCodeBenchProSnapshot(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelHigh-level snapshot of leaderboard rows and difficulty views.
- model_config[source]¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- models: list[LiveCodeBenchProModel] = None[source]¶
- difficulties: dict[LiveCodeBenchProDifficulty, LiveCodeBenchProDifficultyResult] = None[source]¶
- endpoints: list[LiveCodeBenchProEndpoint] = None[source]¶
- class ooai_llm.benchmarks.livecodebench_pro.LiveCodeBenchProClient(*, base_url: str = DEFAULT_LIVECODEBENCH_PRO_BASE_URL, timeout: float = 30, transport: JsonTransport | None = None)[source]¶
Small client for the current LiveCodeBench Pro leaderboard backend.
- Parameters:
base_url – Backend URL. Defaults to the public website backend observed in the frontend bundle.
timeout – HTTP timeout in seconds.
transport – Optional testing hook. It receives the fully built URL and returns a decoded JSON-compatible object.
- list_models(*, status: str | None = None, providers: collections.abc.Sequence[str] | None = None, organizations: collections.abc.Sequence[str] | None = None, query: str | None = None, sort_by: LiveCodeBenchProSort = 'rating', descending: bool = True, limit: int | None = None) list[LiveCodeBenchProModel][source]¶
Return leaderboard model rows with local filters applied.
- get_difficulty(difficulty: LiveCodeBenchProDifficulty, *, providers: collections.abc.Sequence[str] | None = None, organizations: collections.abc.Sequence[str] | None = None, query: str | None = None, sort_by: LiveCodeBenchProSort = 'rating', descending: bool = True, limit: int | None = None) LiveCodeBenchProDifficultyResult[source]¶
Return a per-difficulty leaderboard view.
- get_submissions(*, model_name: str, model_provider: str, difficulty: LiveCodeBenchProDifficulty) LiveCodeBenchProSubmissionsResult[source]¶
Return contest/problem verdicts for one model and difficulty.
- get_submission(submission_id: str) LiveCodeBenchProSubmissionDetail[source]¶
Return an individual submission detail.
- snapshot(*, include_difficulties: bool = True, active_only: bool = False, limit: int | None = None) LiveCodeBenchProSnapshot[source]¶
Return a high-level snapshot of currently exposed data.
- ooai_llm.benchmarks.livecodebench_pro.livecodebench_pro_endpoints() list[LiveCodeBenchProEndpoint][source]¶
Return the currently known LiveCodeBench Pro endpoint surfaces.
- ooai_llm.benchmarks.livecodebench_pro.list_livecodebench_pro_models(*, client: LiveCodeBenchProClient | None = None, **kwargs: Any) list[LiveCodeBenchProModel][source]¶
Return LiveCodeBench Pro model rows using a default client.
- ooai_llm.benchmarks.livecodebench_pro.get_livecodebench_pro_difficulty(difficulty: LiveCodeBenchProDifficulty, *, client: LiveCodeBenchProClient | None = None, **kwargs: Any) LiveCodeBenchProDifficultyResult[source]¶
Return a LiveCodeBench Pro per-difficulty result using a default client.
- ooai_llm.benchmarks.livecodebench_pro.get_livecodebench_pro_submissions(*, model_name: str, model_provider: str, difficulty: LiveCodeBenchProDifficulty, client: LiveCodeBenchProClient | None = None) LiveCodeBenchProSubmissionsResult[source]¶
Return LiveCodeBench Pro contest/problem verdicts using a default client.
- ooai_llm.benchmarks.livecodebench_pro.get_livecodebench_pro_submission(submission_id: str, *, client: LiveCodeBenchProClient | None = None) LiveCodeBenchProSubmissionDetail[source]¶
Return one LiveCodeBench Pro submission detail using a default client.
- ooai_llm.benchmarks.livecodebench_pro.get_livecodebench_pro_snapshot(*, client: LiveCodeBenchProClient | None = None, **kwargs: Any) LiveCodeBenchProSnapshot[source]¶
Return a high-level LiveCodeBench Pro snapshot using a default client.