tolokaforge-models 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tolokaforge_models-1.0.0/.gitignore +112 -0
- tolokaforge_models-1.0.0/CHANGELOG.md +50 -0
- tolokaforge_models-1.0.0/PKG-INFO +17 -0
- tolokaforge_models-1.0.0/pyproject.toml +84 -0
- tolokaforge_models-1.0.0/src/tolokaforge_models/__init__.py +35 -0
- tolokaforge_models-1.0.0/src/tolokaforge_models/certificates/__init__.py +14 -0
- tolokaforge_models-1.0.0/src/tolokaforge_models/certificates/registry.py +2719 -0
- tolokaforge_models-1.0.0/src/tolokaforge_models/data/model_presets.yaml +514 -0
- tolokaforge_models-1.0.0/src/tolokaforge_models/data/pricing.json +1936 -0
- tolokaforge_models-1.0.0/src/tolokaforge_models/data/providers.yaml +127 -0
- tolokaforge_models-1.0.0/src/tolokaforge_models/policies/__init__.py +41 -0
- tolokaforge_models-1.0.0/src/tolokaforge_models/policies/deepseek.py +91 -0
- tolokaforge_models-1.0.0/src/tolokaforge_models/policies/gemini.py +281 -0
- tolokaforge_models-1.0.0/src/tolokaforge_models/policies/inkling.py +167 -0
- tolokaforge_models-1.0.0/src/tolokaforge_models/policies/minimax.py +218 -0
- tolokaforge_models-1.0.0/tests/integration/test_gemini_placeholder_signature_replay.py +362 -0
- tolokaforge_models-1.0.0/tests/integration/test_nova_api.py +550 -0
- tolokaforge_models-1.0.0/tests/unit/fixtures/openrouter_deepseek_v4_reasoning_response.json +20 -0
- tolokaforge_models-1.0.0/tests/unit/test_dict_map_hints_shape.py +89 -0
- tolokaforge_models-1.0.0/tests/unit/test_minimax_m3_tag_recovery.py +289 -0
- tolokaforge_models-1.0.0/tests/unit/test_policies_reachable.py +47 -0
- tolokaforge_models-1.0.0/tests/unit/test_reasoning_codec_openai_summary_replay.py +144 -0
- tolokaforge_models-1.0.0/tests/unit/test_strict_schema_hook_override.py +85 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
MANIFEST
|
|
23
|
+
keys.txt
|
|
24
|
+
keys2.txt
|
|
25
|
+
|
|
26
|
+
# Virtual environments
|
|
27
|
+
venv/
|
|
28
|
+
ENV/
|
|
29
|
+
/env/
|
|
30
|
+
.venv
|
|
31
|
+
|
|
32
|
+
# Testing
|
|
33
|
+
.pytest_cache/
|
|
34
|
+
.coverage
|
|
35
|
+
htmlcov/
|
|
36
|
+
.tox/
|
|
37
|
+
.mypy_cache/
|
|
38
|
+
.ruff_cache/
|
|
39
|
+
|
|
40
|
+
# IDEs
|
|
41
|
+
.idea/
|
|
42
|
+
*.swp
|
|
43
|
+
*.swo
|
|
44
|
+
*~
|
|
45
|
+
|
|
46
|
+
# Environment
|
|
47
|
+
.env
|
|
48
|
+
.env.local
|
|
49
|
+
|
|
50
|
+
# Wheel resolver cache
|
|
51
|
+
.workbench/wheel-cache/
|
|
52
|
+
|
|
53
|
+
# Scratch plans (plans do not live in the repo — architects and milestone
|
|
54
|
+
# integration journals write to ~/.claude/plans/toloka-tolokaforge/ outside
|
|
55
|
+
# the tree; the on-disk artefacts flow into PR bodies via --body-file).
|
|
56
|
+
plans/
|
|
57
|
+
|
|
58
|
+
# Release build artifacts
|
|
59
|
+
release_output/
|
|
60
|
+
|
|
61
|
+
# Results and outputs
|
|
62
|
+
results/
|
|
63
|
+
finished_runs/
|
|
64
|
+
amzn_delivery/
|
|
65
|
+
|
|
66
|
+
# Replay output, wherever the corpus it was read from lives. `retrace`, `reconcile` and judge
|
|
67
|
+
# replay each write under their own --source, which for a committed corpus (tests/data/
|
|
68
|
+
# migration_corpora/**, tests/data/projects/**) is inside the tree — so these are ignored at
|
|
69
|
+
# any depth rather than only under results/. `--dry-run` is the invocation that writes nothing.
|
|
70
|
+
trace_replay/
|
|
71
|
+
reconcile/
|
|
72
|
+
replays/
|
|
73
|
+
|
|
74
|
+
# Output directory (benchmark results, generated reports)
|
|
75
|
+
# NOTE: output/ is a working directory, not committed
|
|
76
|
+
/output/
|
|
77
|
+
|
|
78
|
+
# CI shard configs (generated by eval-orchestrator split)
|
|
79
|
+
.ci/
|
|
80
|
+
|
|
81
|
+
*.log
|
|
82
|
+
!tasks/**/fixtures/*.log
|
|
83
|
+
!tests/canonical/golden/**/*.log
|
|
84
|
+
|
|
85
|
+
# TypeSense data
|
|
86
|
+
.cache/
|
|
87
|
+
typesense-data/
|
|
88
|
+
|
|
89
|
+
# Docker
|
|
90
|
+
.docker/
|
|
91
|
+
|
|
92
|
+
# OS
|
|
93
|
+
.DS_Store
|
|
94
|
+
Thumbs.db
|
|
95
|
+
project-m-copilot-mock-tools.zip
|
|
96
|
+
tau-bench-main.zip
|
|
97
|
+
|
|
98
|
+
# Internal/local-only workspace artifacts (not part of OSS harness)
|
|
99
|
+
_private/
|
|
100
|
+
|
|
101
|
+
# Converted task outputs
|
|
102
|
+
converted/
|
|
103
|
+
temp/
|
|
104
|
+
.claude/*
|
|
105
|
+
# Shared agent/skill definitions are part of the repo
|
|
106
|
+
!.claude/agents/
|
|
107
|
+
!.claude/hooks/
|
|
108
|
+
!.claude/skills/
|
|
109
|
+
!.claude/settings.json
|
|
110
|
+
|
|
111
|
+
# Devcontainer
|
|
112
|
+
devcontainer-lock.json
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `tolokaforge-models` are documented in this file.
|
|
4
|
+
The wheel follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html);
|
|
5
|
+
its release cadence is orthogonal to the `tolokaforge` engine wheel's own
|
|
6
|
+
`vX.Y.Z` tag axis. See
|
|
7
|
+
[`docs/RELEASING.md`](https://github.com/Toloka/tolokaforge/blob/main/docs/RELEASING.md#pypi-package--tolokaforge-models-models-vxyz-automated).
|
|
8
|
+
|
|
9
|
+
## v1.0.0 (unreleased)
|
|
10
|
+
|
|
11
|
+
Initial release. Publishes the `tolokaforge-models` wheel as a sibling of
|
|
12
|
+
the `tolokaforge` engine wheel, carrying the model-data tables and the
|
|
13
|
+
per-model policy / certificate surface the engine reaches through the
|
|
14
|
+
seam module at
|
|
15
|
+
[`tolokaforge.core.model_data`](https://github.com/Toloka/tolokaforge/blob/main/tolokaforge/core/model_data.py).
|
|
16
|
+
|
|
17
|
+
### Feat
|
|
18
|
+
|
|
19
|
+
- **data**: bundles `pricing.json`, `model_presets.yaml`, and
|
|
20
|
+
`providers.yaml` under
|
|
21
|
+
[`tolokaforge_models/data/`](https://github.com/Toloka/tolokaforge/tree/main/tolokaforge_models/src/tolokaforge_models/data).
|
|
22
|
+
The engine resolves them via `bundled_pricing_path()`,
|
|
23
|
+
`bundled_presets_path()`, and `bundled_providers_path()` — see
|
|
24
|
+
[`docs/RELEASING.md § Downstream data-resource consumers`](https://github.com/Toloka/tolokaforge/blob/main/docs/RELEASING.md#downstream-data-resource-consumers).
|
|
25
|
+
- **certificates**: exports the 39 `ModelCertificate` entries in
|
|
26
|
+
`tolokaforge_models.certificates.ALL_MODELS`. The engine's
|
|
27
|
+
`tolokaforge.testing.certify` seam reads the tuple through
|
|
28
|
+
`tolokaforge.core.model_data.bundled_certificates()`.
|
|
29
|
+
- **policies**: ships eight per-model policy subclasses across
|
|
30
|
+
`tolokaforge_models/policies/{gemini,minimax,deepseek,inkling}.py`
|
|
31
|
+
(`GeminiSchema`, `GeminiRecursiveSchema`, `ScalarArrayDictMapResponse`,
|
|
32
|
+
`RefResolvingDictMapHints`, `JsonRecursiveCoerceResponse`,
|
|
33
|
+
`ItemRecursiveUnwrapResponse`, `MinimaxM3TagRecoveryResponse`,
|
|
34
|
+
`OpenAISummaryReplayReasoningCodec`).
|
|
35
|
+
- **loader**: declares the `tolokaforge.policies` entry-point group
|
|
36
|
+
(see `[project.entry-points."tolokaforge.policies"]` in
|
|
37
|
+
`pyproject.toml`). The engine's
|
|
38
|
+
`tolokaforge.core.model_data.load_policy_registrations()` merges these
|
|
39
|
+
into `_POLICY_REGISTRIES` at engine import time; duplicate keys or
|
|
40
|
+
unknown slots fail loud.
|
|
41
|
+
- **api-version**: `__api_version__ = 1` is the integer version of the
|
|
42
|
+
loader contract between this wheel and the engine. Bumped whenever the
|
|
43
|
+
engine-side loader must change to keep reading this wheel's
|
|
44
|
+
registrations.
|
|
45
|
+
- **minimum-engine-version**:
|
|
46
|
+
`minimum_engine_version = ">=0.17,<1.0"`. The engine reads this PEP
|
|
47
|
+
440 specifier at `tolokaforge.core.llm.presets` import via
|
|
48
|
+
`_check_minimum_engine_version()` and refuses to boot on an installed
|
|
49
|
+
engine that does not satisfy it — see
|
|
50
|
+
[`docs/RELEASING.md § Bumping minimum_engine_version on the models wheel`](https://github.com/Toloka/tolokaforge/blob/main/docs/RELEASING.md#bumping-minimum_engine_version-on-the-models-wheel).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: tolokaforge-models
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Model data and per-model policy subclasses for tolokaforge.
|
|
5
|
+
Author: Renaud de la Gueronniere, Tolokaforge Contributors
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Keywords: benchmark,llm,models,tool-use
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
17
|
+
Requires-Python: >=3.10
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "tolokaforge-models"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Model data and per-model policy subclasses for tolokaforge."
|
|
9
|
+
requires-python = ">=3.10"
|
|
10
|
+
license = {text = "Apache-2.0"}
|
|
11
|
+
authors = [
|
|
12
|
+
{name = "Renaud de la Gueronniere"},
|
|
13
|
+
{name = "Tolokaforge Contributors"},
|
|
14
|
+
]
|
|
15
|
+
keywords = ["llm", "benchmark", "tool-use", "models"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Intended Audience :: Science/Research",
|
|
20
|
+
"License :: OSI Approved :: Apache Software License",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Programming Language :: Python :: 3.10",
|
|
23
|
+
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
# No hard ``Requires-Dist: tolokaforge`` on purpose. The
|
|
29
|
+
# ``tolokaforge`` Python package this wheel imports at load time is
|
|
30
|
+
# provided by two independent PyPI distributions in different install
|
|
31
|
+
# contexts: the ``tolokaforge`` engine wheel on host installs, and the
|
|
32
|
+
# Docker-only ``tolokaforge-runner-subset`` wheel inside the runner
|
|
33
|
+
# container. A hard pip-level dep on ``tolokaforge`` would refuse to
|
|
34
|
+
# resolve in the subset context (subset's distribution name is
|
|
35
|
+
# ``tolokaforge-runner-subset``). Version pairing is enforced by
|
|
36
|
+
# ``tolokaforge.core.model_data._check_minimum_engine_version`` at import
|
|
37
|
+
# time against :data:`tolokaforge_models.minimum_engine_version` — that
|
|
38
|
+
# gate is fail-loud, actionable, and independent of the pip resolver.
|
|
39
|
+
dependencies = []
|
|
40
|
+
|
|
41
|
+
[project.entry-points."tolokaforge.policies"]
|
|
42
|
+
# key = "<slot>.<policy-name>" ; value = "<module>:<class>"
|
|
43
|
+
"schema_sanitizer.gemini" = "tolokaforge_models.policies.gemini:GeminiSchema"
|
|
44
|
+
"schema_sanitizer.gemini_recursive" = "tolokaforge_models.policies.gemini:GeminiRecursiveSchema"
|
|
45
|
+
"prompt_policy.dict_map_hints_ref" = "tolokaforge_models.policies.inkling:RefResolvingDictMapHints"
|
|
46
|
+
"response_policy.scalar_array_dict_map" = "tolokaforge_models.policies.gemini:ScalarArrayDictMapResponse"
|
|
47
|
+
"response_policy.minimax_m3_tags" = "tolokaforge_models.policies.minimax:MinimaxM3TagRecoveryResponse"
|
|
48
|
+
"reasoning_codec.openai_summary_replay" = "tolokaforge_models.policies.deepseek:OpenAISummaryReplayReasoningCodec"
|
|
49
|
+
|
|
50
|
+
[tool.hatch.build.targets.wheel]
|
|
51
|
+
packages = ["src/tolokaforge_models"]
|
|
52
|
+
|
|
53
|
+
# =============================================================================
|
|
54
|
+
# Release tooling (commitizen) — drives the `Release tolokaforge-models
|
|
55
|
+
# (cz bump)` workflow. `cz bump` reads/writes the single version literal in
|
|
56
|
+
# `[project] version`, regenerates `CHANGELOG.md` from Conventional Commits,
|
|
57
|
+
# commits, and tags `models-vX.Y.Z`. Independent of the engine's own
|
|
58
|
+
# `[tool.commitizen]` block in the workspace-root `pyproject.toml`.
|
|
59
|
+
# See `docs/RELEASING.md` ("Cutting a tolokaforge-models release").
|
|
60
|
+
# =============================================================================
|
|
61
|
+
|
|
62
|
+
[tool.commitizen]
|
|
63
|
+
name = "cz_conventional_commits"
|
|
64
|
+
version_provider = "pep621" # read/write [project] version in place
|
|
65
|
+
tag_format = "models-v$version" # matches the `models-v*` trigger in publish-tolokaforge-models.yml
|
|
66
|
+
changelog_file = "CHANGELOG.md" # relative to this pyproject's directory
|
|
67
|
+
version_files = [
|
|
68
|
+
"src/tolokaforge_models/__init__.py:__version__",
|
|
69
|
+
]
|
|
70
|
+
update_changelog_on_bump = true
|
|
71
|
+
changelog_incremental = true # only prepend new sections; never rewrite hand-written history
|
|
72
|
+
bump_message = "chore(models-release): bump tolokaforge-models to $new_version"
|
|
73
|
+
annotated_tag = true
|
|
74
|
+
|
|
75
|
+
# Keep the workspace-root `uv.lock` in step with the models version bump.
|
|
76
|
+
# `cz bump` writes the new version literal but does not relock; without this
|
|
77
|
+
# the lockfile would pin the previous version. `uv lock` regenerates the
|
|
78
|
+
# workspace root's lock from any workspace member. `pre_bump_hooks` run after
|
|
79
|
+
# the version write and before cz's commit, so cz folds the staged lockfile
|
|
80
|
+
# into the same release commit.
|
|
81
|
+
pre_bump_hooks = [
|
|
82
|
+
"uv lock",
|
|
83
|
+
"git add -- ../uv.lock",
|
|
84
|
+
]
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""Model data and per-model policy subclasses for tolokaforge.
|
|
2
|
+
|
|
3
|
+
This wheel ships the bundled ``pricing.json``, ``model_presets.yaml``,
|
|
4
|
+
and ``providers.yaml`` tables, plus the per-model policy subclasses
|
|
5
|
+
and the ``ModelCertificate`` registry that
|
|
6
|
+
the engine consumes through its light seam in
|
|
7
|
+
:mod:`tolokaforge.core.model_data`.
|
|
8
|
+
|
|
9
|
+
The wheel imports no first-party engine module at load time; a repo
|
|
10
|
+
that has never installed :mod:`tolokaforge` can still ``import
|
|
11
|
+
tolokaforge_models`` and read the three constants below.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
from typing import Final
|
|
17
|
+
|
|
18
|
+
__all__ = [
|
|
19
|
+
"__api_version__",
|
|
20
|
+
"__version__",
|
|
21
|
+
"minimum_engine_version",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
__version__: Final[str] = "1.0.0"
|
|
25
|
+
"""PEP 440 version of the models wheel itself."""
|
|
26
|
+
|
|
27
|
+
__api_version__: Final[int] = 1
|
|
28
|
+
"""Integer version of the loader contract between this wheel and the
|
|
29
|
+
engine. Bumped whenever the engine-side loader must change to keep
|
|
30
|
+
reading this wheel's registrations."""
|
|
31
|
+
|
|
32
|
+
minimum_engine_version: Final[str] = ">=0.17,<1.0"
|
|
33
|
+
"""PEP 440 specifier naming the engine range this wheel targets. The
|
|
34
|
+
engine consults this string at import time to refuse to boot against
|
|
35
|
+
an incompatible pair (see :mod:`tolokaforge.core.model_data`)."""
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Registry of :class:`tolokaforge.testing.certify.ModelCertificate` instances.
|
|
2
|
+
|
|
3
|
+
The engine reaches this tuple through
|
|
4
|
+
:func:`tolokaforge.core.model_data.bundled_certificates`, which is
|
|
5
|
+
re-exposed as :data:`tolokaforge.testing.certify.ALL_MODELS` at the
|
|
6
|
+
public certify seam. Adding a new certificate is an edit to
|
|
7
|
+
:mod:`tolokaforge_models.certificates.registry`.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
from tolokaforge_models.certificates.registry import ALL_MODELS
|
|
13
|
+
|
|
14
|
+
__all__ = ["ALL_MODELS"]
|