bios-mcp 0.1.1-dev.13 → 0.1.1-dev.16
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.
- package/README.md +62 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,22 +41,73 @@ not claimed without an explicit acknowledgement from the endpoint.
|
|
|
41
41
|
## Safe inference workflow
|
|
42
42
|
|
|
43
43
|
1. `get_inference_gpu_options` returns inference-fit configurations joined to
|
|
44
|
-
authoritative deployment prices and stock.
|
|
45
|
-
|
|
44
|
+
authoritative deployment prices and stock. Prefer the MODEL-ADDRESSED form
|
|
45
|
+
(`model=<hf_repo_id>`, optionally `revision`/`hf_integration_id`): the
|
|
46
|
+
server resolves the model facts (vision-aware) and answers with computed
|
|
47
|
+
`min_gpus`, `valid_counts`, and `bookable_counts` — the exact minimums the
|
|
48
|
+
create gate enforces, so client-supplied facts can never understate a
|
|
49
|
+
minimum. `unknown` is not treated as available; never offer a count below
|
|
50
|
+
`min_gpus` or outside `bookable_counts`.
|
|
46
51
|
2. `preflight_inference` validates the exact source, model, GPU, queue, price
|
|
47
52
|
cap, and wallet-hold terms without creating a deployment or mutating funds.
|
|
48
|
-
3. `create_inference` uses the same request contract
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
3. `create_inference` uses the same request contract, self-validates the
|
|
54
|
+
selection against the model-addressed minimums before submitting, and
|
|
55
|
+
follows BOOK-BEFORE-REVEAL: a non-queued create answers `202` with a
|
|
56
|
+
booking handle while a vendor-accepted GPU is booked (30-40 s typical); the
|
|
57
|
+
tool polls the handle and returns the full payload — including the ONE-TIME
|
|
58
|
+
`inference_key` — only after the GPU is confirmed. A definitive miss
|
|
59
|
+
returns the standard `CAPACITY_UNAVAILABLE` error with fresh alternatives
|
|
60
|
+
and NO deployment exists (nothing charged). Queueing is opt-in, a maximum
|
|
61
|
+
total hourly price is explicit, and a GPU alternative is never selected
|
|
62
|
+
without approval. `gpu_priorities` backups (1-5 ranked choices) may be
|
|
63
|
+
supplied on ANY create — they form the after-start replacement ladder;
|
|
64
|
+
the queue itself stays opt-in.
|
|
65
|
+
4. `get_inference_booking` polls a booking handle from a long-running
|
|
66
|
+
`create_inference` (pending → revealed payload → or the standard 409).
|
|
67
|
+
5. `get_inference_status` reports durable queue state, provisioning/loading,
|
|
68
|
+
endpoint readiness, price cap, notification summary, and wallet
|
|
69
|
+
authorization. An endpoint is live only when the returned status is
|
|
70
|
+
`running`. `queued_capacity` means waiting for stock at zero charge —
|
|
71
|
+
after a deployment has ever been booked, GPU loss never ends in a
|
|
72
|
+
capacity failure; it waits and auto-resumes.
|
|
73
|
+
6. `get_inference_notifications` reports durable lifecycle-email delivery,
|
|
56
74
|
bounded retries, and operator-visible dead letters.
|
|
57
|
-
|
|
75
|
+
7. `update_inference_policy`, `stop_inference`, `resume_inference`,
|
|
58
76
|
`restart_inference`, and `delete_inference` manage the lifecycle.
|
|
59
77
|
|
|
78
|
+
## Standard capacity error contract
|
|
79
|
+
|
|
80
|
+
Training and inference speak ONE capacity rejection shape: HTTP `409` with
|
|
81
|
+
`error.code = CAPACITY_UNAVAILABLE` (training also echoes the deprecated
|
|
82
|
+
`SELECTED_GPU_UNAVAILABLE` as `legacy_code` for one release). The MCP
|
|
83
|
+
transport serializes it as compact JSON in the tool-error text — even when
|
|
84
|
+
zero alternatives exist — so an agent can act on it directly:
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"code": "CAPACITY_UNAVAILABLE",
|
|
89
|
+
"reason": "insufficient_stock | below_model_minimum | invalid_gpu_count | model_too_large",
|
|
90
|
+
"message": "H200 is out of stock",
|
|
91
|
+
"recoverable": true,
|
|
92
|
+
"instruction": "Retry with one of available_gpus (never below its min_gpus), or resubmit with allow_capacity_queue=true.",
|
|
93
|
+
"available_gpus": [
|
|
94
|
+
{ "gpu_type": "H100_80GB", "gpu_count": 2, "min_gpus": 2, "valid_counts": [2, 4, 8],
|
|
95
|
+
"tier": "secure", "price_hour_cents": 598, "available_count": 6 }
|
|
96
|
+
],
|
|
97
|
+
"minimum_requirement": {
|
|
98
|
+
"selected_gpu_min": 2, "selected_valid_counts": [2, 4, 8],
|
|
99
|
+
"per_type": [{ "gpu_type": "H200", "min_gpus": 2, "valid_counts": [2, 4, 8] }]
|
|
100
|
+
},
|
|
101
|
+
"selected": { "gpu_type": "H200", "gpu_count": 2, "availability_status": "out_of_stock" },
|
|
102
|
+
"queue_eligible": false,
|
|
103
|
+
"checked_at": "2026-07-19T00:00:00Z"
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
A `503 ADMISSION_UNAVAILABLE` is a transient market outage, never a capacity
|
|
108
|
+
verdict — retry shortly, never conclude out-of-stock from it. See
|
|
109
|
+
`get_platform_guide` topic `capacity_errors` for the recovery playbook.
|
|
110
|
+
|
|
60
111
|
Raw Hugging Face tokens are intentionally excluded from MCP tool inputs. Store
|
|
61
112
|
the token in a platform Hugging Face integration and pass `hf_integration_id`.
|
|
62
113
|
|