wiretruth 0.1.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.
- wiretruth-0.1.0/LICENSE +21 -0
- wiretruth-0.1.0/PKG-INFO +158 -0
- wiretruth-0.1.0/README.md +129 -0
- wiretruth-0.1.0/pyproject.toml +57 -0
- wiretruth-0.1.0/setup.cfg +4 -0
- wiretruth-0.1.0/src/wiretruth/__init__.py +3 -0
- wiretruth-0.1.0/src/wiretruth/__main__.py +4 -0
- wiretruth-0.1.0/src/wiretruth/checks.py +504 -0
- wiretruth-0.1.0/src/wiretruth/cli.py +417 -0
- wiretruth-0.1.0/src/wiretruth/envs.py +120 -0
- wiretruth-0.1.0/src/wiretruth/formats.py +1128 -0
- wiretruth-0.1.0/src/wiretruth/grading.py +164 -0
- wiretruth-0.1.0/src/wiretruth/lint.py +275 -0
- wiretruth-0.1.0/src/wiretruth/providers/__init__.py +133 -0
- wiretruth-0.1.0/src/wiretruth/providers/openai_chat.py +363 -0
- wiretruth-0.1.0/src/wiretruth/recorder.py +481 -0
- wiretruth-0.1.0/src/wiretruth/replay.py +391 -0
- wiretruth-0.1.0/src/wiretruth/results.py +216 -0
- wiretruth-0.1.0/src/wiretruth/runner.py +353 -0
- wiretruth-0.1.0/src/wiretruth/schemas/bug-classes.schema.json +29 -0
- wiretruth-0.1.0/src/wiretruth/schemas/call.schema.json +113 -0
- wiretruth-0.1.0/src/wiretruth/schemas/common.schema.json +98 -0
- wiretruth-0.1.0/src/wiretruth/schemas/fixture.schema.json +243 -0
- wiretruth-0.1.0/src/wiretruth/schemas/observation.schema.json +191 -0
- wiretruth-0.1.0/src/wiretruth/schemas/results.schema.json +91 -0
- wiretruth-0.1.0/src/wiretruth/schemas/scenario.schema.json +91 -0
- wiretruth-0.1.0/src/wiretruth/schemas/shim-manifest.schema.json +125 -0
- wiretruth-0.1.0/src/wiretruth/schemas/upstream.schema.json +60 -0
- wiretruth-0.1.0/src/wiretruth/secret_scan.py +190 -0
- wiretruth-0.1.0/src/wiretruth.egg-info/PKG-INFO +158 -0
- wiretruth-0.1.0/src/wiretruth.egg-info/SOURCES.txt +34 -0
- wiretruth-0.1.0/src/wiretruth.egg-info/dependency_links.txt +1 -0
- wiretruth-0.1.0/src/wiretruth.egg-info/entry_points.txt +2 -0
- wiretruth-0.1.0/src/wiretruth.egg-info/requires.txt +8 -0
- wiretruth-0.1.0/src/wiretruth.egg-info/top_level.txt +1 -0
- wiretruth-0.1.0/tests/test_cli.py +136 -0
wiretruth-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 kartsan03
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
wiretruth-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wiretruth
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Replays real LLM provider responses through LLM SDKs and checks whether each SDK reports what actually happened.
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/kartsan03/wiretruth
|
|
7
|
+
Project-URL: Repository, https://github.com/kartsan03/wiretruth
|
|
8
|
+
Project-URL: Issues, https://github.com/kartsan03/wiretruth/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/kartsan03/wiretruth/blob/main/CHANGELOG.md
|
|
10
|
+
Keywords: llm,sdk,conformance,test-suite,openai,anthropic,gemini,ollama,testing
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Topic :: Software Development :: Testing
|
|
14
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: jsonschema>=4.21
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
24
|
+
Requires-Dist: pytest-cov>=5; extra == "dev"
|
|
25
|
+
Requires-Dist: ruff>=0.6; extra == "dev"
|
|
26
|
+
Requires-Dist: mypy>=1.11; extra == "dev"
|
|
27
|
+
Requires-Dist: types-jsonschema; extra == "dev"
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
# wiretruth
|
|
31
|
+
|
|
32
|
+
wiretruth replays real LLM provider responses through LLM SDKs and checks whether each SDK reports what actually
|
|
33
|
+
happened.
|
|
34
|
+
|
|
35
|
+
**Does your LLM SDK tell you the truth?**
|
|
36
|
+
|
|
37
|
+
[](https://github.com/kartsan03/wiretruth/actions/workflows/ci.yml)
|
|
38
|
+
[](https://pypi.org/project/wiretruth/)
|
|
39
|
+
[](https://github.com/kartsan03/wiretruth/blob/main/LICENSE)
|
|
40
|
+
|
|
41
|
+
Version 0.1 tests one library, any-llm, on the OpenAI Chat Completions API with three truncation scenarios. More
|
|
42
|
+
providers and libraries follow, and a public results matrix arrives in v0.4. Until then, the grades are in
|
|
43
|
+
[`results/`](https://github.com/kartsan03/wiretruth/tree/main/results).
|
|
44
|
+
|
|
45
|
+
## Why
|
|
46
|
+
|
|
47
|
+
A model hits its output token limit halfway through a JSON object. The provider says so plainly:
|
|
48
|
+
`"finish_reason": "length"`. What your code sees depends on the SDK in between. If the SDK raises a generic JSON
|
|
49
|
+
parse error, nothing tells you that a higher limit would fix it. If it returns the partial object as a success,
|
|
50
|
+
your pipeline stores an incomplete record.
|
|
51
|
+
|
|
52
|
+
wiretruth has this case recorded as `truncation.structured-output` on `openai-chat`. Replayed through any-llm:
|
|
53
|
+
|
|
54
|
+
| Library | What the caller gets | Grade |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| any-llm 1.33.0 | Raises `openai.LengthFinishReasonError`. Its `completion` has `finish_reason: "length"` and the token usage. | ✓ PASS |
|
|
57
|
+
|
|
58
|
+
wiretruth runs the same recorded edge cases through every library it supports and grades each one against what the
|
|
59
|
+
provider sent.
|
|
60
|
+
|
|
61
|
+
## What it checks
|
|
62
|
+
|
|
63
|
+
| Bug class | What goes wrong for users | Scenarios |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| Silent truncation | Agents accept partial output or retry without raising the limit | 3 |
|
|
66
|
+
| Finish reason mapping | Control flow branches on the wrong reason | planned |
|
|
67
|
+
| Usage accounting | Cost and quota tracking is off (cached and reasoning tokens) | planned |
|
|
68
|
+
| Stream integrity | Corrupted or unfinished text is treated as final | planned |
|
|
69
|
+
| Tool call fidelity | Tools run with broken or merged arguments | planned |
|
|
70
|
+
| Error classification | Retries and backoff misbehave | planned |
|
|
71
|
+
| Request fidelity | The library sends options the caller didn't set | planned |
|
|
72
|
+
|
|
73
|
+
The scenarios are in
|
|
74
|
+
[`suite/scenarios/`](https://github.com/kartsan03/wiretruth/tree/main/suite/scenarios), and the bug classes in
|
|
75
|
+
[`suite/bug-classes.json`](https://github.com/kartsan03/wiretruth/blob/main/suite/bug-classes.json).
|
|
76
|
+
|
|
77
|
+
## Grades
|
|
78
|
+
|
|
79
|
+
| | Grade | Meaning |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| ✓ | PASS | Reports what happened: meets every MUST requirement of the scenario. |
|
|
82
|
+
| ~ | LOSSY | Doesn't contradict what happened, but the fact is only in raw metadata, or missing. |
|
|
83
|
+
| ✗ | WRONG | Reports something that contradicts what happened. |
|
|
84
|
+
| ! | CRASH | Fails with an internal error, such as a `KeyError` in its own parser. |
|
|
85
|
+
| ⧗ | HANG | Doesn't return within 20 s on a response that ended within 1 s. |
|
|
86
|
+
| – | UNSUPPORTED | The library doesn't support this provider or feature (documented). |
|
|
87
|
+
| ? | HARNESS | A problem on our side, not the library's. |
|
|
88
|
+
|
|
89
|
+
Each scenario lists its requirements. MUST requirements set the grade. SHOULD requirements, such as the exact
|
|
90
|
+
partial text in the truncation scenarios, add a note when they aren't met. How grades are computed:
|
|
91
|
+
[docs/grading.md](https://github.com/kartsan03/wiretruth/blob/main/docs/grading.md).
|
|
92
|
+
|
|
93
|
+
## Quickstart
|
|
94
|
+
|
|
95
|
+
You need Python 3.11 or newer and [uv](https://docs.astral.sh/uv/), which builds each library's own environment.
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
git clone https://github.com/kartsan03/wiretruth && cd wiretruth
|
|
99
|
+
uv run wiretruth run --lib any-llm
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
scenario openai-chat
|
|
104
|
+
truncation.structured-output ✓ PASS
|
|
105
|
+
truncation.text ✓ PASS
|
|
106
|
+
truncation.text-stream ✓ PASS
|
|
107
|
+
|
|
108
|
+
any-llm 1.33.0: 3 cells, 3 PASS
|
|
109
|
+
stderr: .wiretruth/runs/20261010T193444.312067Z
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
No API keys are needed. Everything runs against recorded responses on `127.0.0.1`. The first run downloads any-llm
|
|
113
|
+
into `.wiretruth/envs/`; later runs work offline. `uv run wiretruth run --shim shims/reference` runs the
|
|
114
|
+
built-in reference client, which must pass every cell. The scenarios, fixtures and shims live in this repository,
|
|
115
|
+
so wiretruth runs from a clone.
|
|
116
|
+
|
|
117
|
+
## Add your library
|
|
118
|
+
|
|
119
|
+
A shim is a small program. It reads a call spec as JSON on stdin, calls your library the way its docs show, and
|
|
120
|
+
prints what the library reported as JSON on stdout. The
|
|
121
|
+
[any-llm shim](https://github.com/kartsan03/wiretruth/blob/main/shims/python/any-llm/shim.py) is 150 lines. The
|
|
122
|
+
protocol is in [shims/README.md](https://github.com/kartsan03/wiretruth/blob/main/shims/README.md); to propose a
|
|
123
|
+
library, [open a new-library issue](https://github.com/kartsan03/wiretruth/issues/new?template=new-library.yml).
|
|
124
|
+
|
|
125
|
+
## Related work
|
|
126
|
+
|
|
127
|
+
- [Open Responses](https://github.com/openresponses/openresponses): a spec and compliance tests for servers that
|
|
128
|
+
implement the Responses API. wiretruth tests clients across several native APIs.
|
|
129
|
+
- [LLMConform](https://github.com/aitk-org/LLMConform): conformance tests for LLM gateways and APIs, run live.
|
|
130
|
+
- [llmprobe](https://github.com/ivanfioravanti/llmprobe) and [conform](https://github.com/NiLabs-Org/conform):
|
|
131
|
+
conformance for inference engines (vLLM, llama.cpp, Ollama, …).
|
|
132
|
+
- [aimock](https://github.com/CopilotKit/aimock): a mock server for testing AI apps, with record and replay. Use it
|
|
133
|
+
for your app's tests; wiretruth audits the SDK layer itself.
|
|
134
|
+
- The design borrows from [JSONTestSuite](https://github.com/nst/JSONTestSuite),
|
|
135
|
+
[Wycheproof](https://github.com/C2SP/wycheproof), [toml-test](https://github.com/toml-lang/toml-test) and
|
|
136
|
+
[compat-table](https://github.com/compat-table/compat-table).
|
|
137
|
+
|
|
138
|
+
## Author note
|
|
139
|
+
|
|
140
|
+
I've contributed fixes to libraries that wiretruth tests or will test:
|
|
141
|
+
[mozilla-ai/any-llm#1389](https://github.com/mozilla-ai/any-llm/pull/1389) and
|
|
142
|
+
[TanStack/ai#1548](https://github.com/TanStack/ai/pull/1548). Grades are computed by the code in this repository.
|
|
143
|
+
If you think a grade is wrong, please
|
|
144
|
+
[open a grade dispute](https://github.com/kartsan03/wiretruth/issues/new?template=grade-dispute.yml).
|
|
145
|
+
|
|
146
|
+
## Contributing
|
|
147
|
+
|
|
148
|
+
Scenario ideas, new libraries and grade disputes are all welcome. See
|
|
149
|
+
[CONTRIBUTING.md](https://github.com/kartsan03/wiretruth/blob/main/CONTRIBUTING.md).
|
|
150
|
+
|
|
151
|
+
## Citing
|
|
152
|
+
|
|
153
|
+
See [CITATION.cff](https://github.com/kartsan03/wiretruth/blob/main/CITATION.cff).
|
|
154
|
+
|
|
155
|
+
## License
|
|
156
|
+
|
|
157
|
+
MIT. Fixtures contain model outputs recorded from provider APIs;
|
|
158
|
+
[docs/recording.md](https://github.com/kartsan03/wiretruth/blob/main/docs/recording.md) explains how they're recorded.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# wiretruth
|
|
2
|
+
|
|
3
|
+
wiretruth replays real LLM provider responses through LLM SDKs and checks whether each SDK reports what actually
|
|
4
|
+
happened.
|
|
5
|
+
|
|
6
|
+
**Does your LLM SDK tell you the truth?**
|
|
7
|
+
|
|
8
|
+
[](https://github.com/kartsan03/wiretruth/actions/workflows/ci.yml)
|
|
9
|
+
[](https://pypi.org/project/wiretruth/)
|
|
10
|
+
[](https://github.com/kartsan03/wiretruth/blob/main/LICENSE)
|
|
11
|
+
|
|
12
|
+
Version 0.1 tests one library, any-llm, on the OpenAI Chat Completions API with three truncation scenarios. More
|
|
13
|
+
providers and libraries follow, and a public results matrix arrives in v0.4. Until then, the grades are in
|
|
14
|
+
[`results/`](https://github.com/kartsan03/wiretruth/tree/main/results).
|
|
15
|
+
|
|
16
|
+
## Why
|
|
17
|
+
|
|
18
|
+
A model hits its output token limit halfway through a JSON object. The provider says so plainly:
|
|
19
|
+
`"finish_reason": "length"`. What your code sees depends on the SDK in between. If the SDK raises a generic JSON
|
|
20
|
+
parse error, nothing tells you that a higher limit would fix it. If it returns the partial object as a success,
|
|
21
|
+
your pipeline stores an incomplete record.
|
|
22
|
+
|
|
23
|
+
wiretruth has this case recorded as `truncation.structured-output` on `openai-chat`. Replayed through any-llm:
|
|
24
|
+
|
|
25
|
+
| Library | What the caller gets | Grade |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| any-llm 1.33.0 | Raises `openai.LengthFinishReasonError`. Its `completion` has `finish_reason: "length"` and the token usage. | ✓ PASS |
|
|
28
|
+
|
|
29
|
+
wiretruth runs the same recorded edge cases through every library it supports and grades each one against what the
|
|
30
|
+
provider sent.
|
|
31
|
+
|
|
32
|
+
## What it checks
|
|
33
|
+
|
|
34
|
+
| Bug class | What goes wrong for users | Scenarios |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| Silent truncation | Agents accept partial output or retry without raising the limit | 3 |
|
|
37
|
+
| Finish reason mapping | Control flow branches on the wrong reason | planned |
|
|
38
|
+
| Usage accounting | Cost and quota tracking is off (cached and reasoning tokens) | planned |
|
|
39
|
+
| Stream integrity | Corrupted or unfinished text is treated as final | planned |
|
|
40
|
+
| Tool call fidelity | Tools run with broken or merged arguments | planned |
|
|
41
|
+
| Error classification | Retries and backoff misbehave | planned |
|
|
42
|
+
| Request fidelity | The library sends options the caller didn't set | planned |
|
|
43
|
+
|
|
44
|
+
The scenarios are in
|
|
45
|
+
[`suite/scenarios/`](https://github.com/kartsan03/wiretruth/tree/main/suite/scenarios), and the bug classes in
|
|
46
|
+
[`suite/bug-classes.json`](https://github.com/kartsan03/wiretruth/blob/main/suite/bug-classes.json).
|
|
47
|
+
|
|
48
|
+
## Grades
|
|
49
|
+
|
|
50
|
+
| | Grade | Meaning |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| ✓ | PASS | Reports what happened: meets every MUST requirement of the scenario. |
|
|
53
|
+
| ~ | LOSSY | Doesn't contradict what happened, but the fact is only in raw metadata, or missing. |
|
|
54
|
+
| ✗ | WRONG | Reports something that contradicts what happened. |
|
|
55
|
+
| ! | CRASH | Fails with an internal error, such as a `KeyError` in its own parser. |
|
|
56
|
+
| ⧗ | HANG | Doesn't return within 20 s on a response that ended within 1 s. |
|
|
57
|
+
| – | UNSUPPORTED | The library doesn't support this provider or feature (documented). |
|
|
58
|
+
| ? | HARNESS | A problem on our side, not the library's. |
|
|
59
|
+
|
|
60
|
+
Each scenario lists its requirements. MUST requirements set the grade. SHOULD requirements, such as the exact
|
|
61
|
+
partial text in the truncation scenarios, add a note when they aren't met. How grades are computed:
|
|
62
|
+
[docs/grading.md](https://github.com/kartsan03/wiretruth/blob/main/docs/grading.md).
|
|
63
|
+
|
|
64
|
+
## Quickstart
|
|
65
|
+
|
|
66
|
+
You need Python 3.11 or newer and [uv](https://docs.astral.sh/uv/), which builds each library's own environment.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
git clone https://github.com/kartsan03/wiretruth && cd wiretruth
|
|
70
|
+
uv run wiretruth run --lib any-llm
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
scenario openai-chat
|
|
75
|
+
truncation.structured-output ✓ PASS
|
|
76
|
+
truncation.text ✓ PASS
|
|
77
|
+
truncation.text-stream ✓ PASS
|
|
78
|
+
|
|
79
|
+
any-llm 1.33.0: 3 cells, 3 PASS
|
|
80
|
+
stderr: .wiretruth/runs/20261010T193444.312067Z
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
No API keys are needed. Everything runs against recorded responses on `127.0.0.1`. The first run downloads any-llm
|
|
84
|
+
into `.wiretruth/envs/`; later runs work offline. `uv run wiretruth run --shim shims/reference` runs the
|
|
85
|
+
built-in reference client, which must pass every cell. The scenarios, fixtures and shims live in this repository,
|
|
86
|
+
so wiretruth runs from a clone.
|
|
87
|
+
|
|
88
|
+
## Add your library
|
|
89
|
+
|
|
90
|
+
A shim is a small program. It reads a call spec as JSON on stdin, calls your library the way its docs show, and
|
|
91
|
+
prints what the library reported as JSON on stdout. The
|
|
92
|
+
[any-llm shim](https://github.com/kartsan03/wiretruth/blob/main/shims/python/any-llm/shim.py) is 150 lines. The
|
|
93
|
+
protocol is in [shims/README.md](https://github.com/kartsan03/wiretruth/blob/main/shims/README.md); to propose a
|
|
94
|
+
library, [open a new-library issue](https://github.com/kartsan03/wiretruth/issues/new?template=new-library.yml).
|
|
95
|
+
|
|
96
|
+
## Related work
|
|
97
|
+
|
|
98
|
+
- [Open Responses](https://github.com/openresponses/openresponses): a spec and compliance tests for servers that
|
|
99
|
+
implement the Responses API. wiretruth tests clients across several native APIs.
|
|
100
|
+
- [LLMConform](https://github.com/aitk-org/LLMConform): conformance tests for LLM gateways and APIs, run live.
|
|
101
|
+
- [llmprobe](https://github.com/ivanfioravanti/llmprobe) and [conform](https://github.com/NiLabs-Org/conform):
|
|
102
|
+
conformance for inference engines (vLLM, llama.cpp, Ollama, …).
|
|
103
|
+
- [aimock](https://github.com/CopilotKit/aimock): a mock server for testing AI apps, with record and replay. Use it
|
|
104
|
+
for your app's tests; wiretruth audits the SDK layer itself.
|
|
105
|
+
- The design borrows from [JSONTestSuite](https://github.com/nst/JSONTestSuite),
|
|
106
|
+
[Wycheproof](https://github.com/C2SP/wycheproof), [toml-test](https://github.com/toml-lang/toml-test) and
|
|
107
|
+
[compat-table](https://github.com/compat-table/compat-table).
|
|
108
|
+
|
|
109
|
+
## Author note
|
|
110
|
+
|
|
111
|
+
I've contributed fixes to libraries that wiretruth tests or will test:
|
|
112
|
+
[mozilla-ai/any-llm#1389](https://github.com/mozilla-ai/any-llm/pull/1389) and
|
|
113
|
+
[TanStack/ai#1548](https://github.com/TanStack/ai/pull/1548). Grades are computed by the code in this repository.
|
|
114
|
+
If you think a grade is wrong, please
|
|
115
|
+
[open a grade dispute](https://github.com/kartsan03/wiretruth/issues/new?template=grade-dispute.yml).
|
|
116
|
+
|
|
117
|
+
## Contributing
|
|
118
|
+
|
|
119
|
+
Scenario ideas, new libraries and grade disputes are all welcome. See
|
|
120
|
+
[CONTRIBUTING.md](https://github.com/kartsan03/wiretruth/blob/main/CONTRIBUTING.md).
|
|
121
|
+
|
|
122
|
+
## Citing
|
|
123
|
+
|
|
124
|
+
See [CITATION.cff](https://github.com/kartsan03/wiretruth/blob/main/CITATION.cff).
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
MIT. Fixtures contain model outputs recorded from provider APIs;
|
|
129
|
+
[docs/recording.md](https://github.com/kartsan03/wiretruth/blob/main/docs/recording.md) explains how they're recorded.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "wiretruth"
|
|
3
|
+
dynamic = ["version"]
|
|
4
|
+
description = "Replays real LLM provider responses through LLM SDKs and checks whether each SDK reports what actually happened."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
requires-python = ">=3.11"
|
|
8
|
+
# 4.18 added the `referencing` registry used for $ref between the bundled schemas; the tests
|
|
9
|
+
# pass from 4.21 on (CI runs them on 4.21.0), where some error messages changed wording.
|
|
10
|
+
dependencies = ["jsonschema>=4.21"]
|
|
11
|
+
keywords = ["llm", "sdk", "conformance", "test-suite", "openai", "anthropic", "gemini", "ollama", "testing"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 3 - Alpha",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
"Topic :: Software Development :: Testing",
|
|
16
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
17
|
+
"Programming Language :: Python :: 3.11",
|
|
18
|
+
"Programming Language :: Python :: 3.12",
|
|
19
|
+
"Programming Language :: Python :: 3.13",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
[project.optional-dependencies]
|
|
23
|
+
dev = ["pytest>=8", "pytest-cov>=5", "ruff>=0.6", "mypy>=1.11", "types-jsonschema"]
|
|
24
|
+
|
|
25
|
+
[project.scripts]
|
|
26
|
+
wiretruth = "wiretruth.cli:main"
|
|
27
|
+
|
|
28
|
+
[project.urls]
|
|
29
|
+
Homepage = "https://github.com/kartsan03/wiretruth"
|
|
30
|
+
Repository = "https://github.com/kartsan03/wiretruth"
|
|
31
|
+
Issues = "https://github.com/kartsan03/wiretruth/issues"
|
|
32
|
+
Changelog = "https://github.com/kartsan03/wiretruth/blob/main/CHANGELOG.md"
|
|
33
|
+
|
|
34
|
+
[build-system]
|
|
35
|
+
requires = ["setuptools>=77"]
|
|
36
|
+
build-backend = "setuptools.build_meta"
|
|
37
|
+
|
|
38
|
+
[tool.setuptools.dynamic]
|
|
39
|
+
version = { attr = "wiretruth.__version__" }
|
|
40
|
+
|
|
41
|
+
[tool.setuptools.package-data]
|
|
42
|
+
wiretruth = ["schemas/*.json"]
|
|
43
|
+
|
|
44
|
+
[tool.ruff]
|
|
45
|
+
line-length = 100
|
|
46
|
+
target-version = "py311"
|
|
47
|
+
|
|
48
|
+
[tool.ruff.lint]
|
|
49
|
+
select = ["E", "F", "I", "B", "UP", "SIM", "RUF"]
|
|
50
|
+
|
|
51
|
+
[tool.mypy]
|
|
52
|
+
strict = true
|
|
53
|
+
python_version = "3.11"
|
|
54
|
+
files = ["src"]
|
|
55
|
+
|
|
56
|
+
[tool.pytest.ini_options]
|
|
57
|
+
testpaths = ["tests"]
|