1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! SDK compatibility test suite.
//!
//! These tests are the contract between `openkindd` and the proposed
//! TypeSafe Python SDK. They cover every endpoint, every error code,
//! every header, and every payload shape the SDK sends or reads.
//!
//! Each test is anchored to a specific section of the SDK reference
//! (docs.typesafe.ai/sdk/python/api/*). If a test fails, the server
//! has drifted from the spec — fix the server, not the test.
//!
//! Tests are organized by SDK surface:
//! 1. `system_one` — request shape, response shape, types
//! 2. `models.list` — payload shape, sorting, fields
//! 3. Error mapping — 400/401/404/422/429 → SDK exception types
//! 4. Headers — `x-typesafe-request-id`, `Retry-After`, `retry-after-ms`
//! 5. Auth — bearer token semantics, env var, public paths
//! 6. Default model — `jev-latest` alias works without override
//! 7. SDK contract — client options, types, models, responses, retries, errors
//!
//! Run with: `cargo test -p openkind-api --test sdk_compat`