mirror of
https://github.com/dtzp555-max/olp.git
synced 2026-07-19 09:45:07 +00:00
* docs: Phase 5 close-prep — README § Plan Usage + supported-provider matrix + live E2E artifact
Pre-close documentation pass per ADR 0012 § Exit gate items 3 + 9.
v0.5.0 close PR (package.json bump + CHANGELOG promotion + tag) is
maintainer-triggered per CLAUDE.md release_kit.phase_close_trigger.
What this PR ships:
(1) README § What you get — added Plan-usage probe bullet with anchor to
the new § Plan Usage section.
(2) README § Supported Providers — table gained "Quota probe (v0.5.0+)"
column. Anthropic ✅ live (13 anthropic-ratelimit-unified-* headers,
opt-in via quota_probe_enabled). Codex ❌ no public quota API.
Mistral ❌ per D84 spike 2026-05-26 (no /v1/usage at docs.mistral.ai/api).
Others TBD (Phase 8+).
(3) README new § Plan Usage (live quota probe) between § Configuration and
§ API Endpoints. Documents: how the probe works (POST /v1/messages
with max_tokens:1 + headers-only parse), opt-in config block, OAuth
token sources (env / .credentials.json / macOS Keychain), olp doctor
integration, schema-drift protection (Path A `strings` over compiled
binary + Path B live probe diff), full ADR cross-refs. Embeds the
dashboard screenshot below.
(4) README § API Endpoints — updated /dashboard / /v0/management/dashboard-data
/ /v0/management/quota rows to reflect Phase 5 changes:
- /dashboard: Claude.ai-style Plan Usage section + 60s auto-refresh + manual button
- /v0/management/dashboard-data: new quota_v2 field alongside legacy quota
- /v0/management/quota: mirrors dashboard-data quota_v2 for scripted monitoring
(5) docs/img/dashboard-v0.5.0.png — dashboard screenshot rendered from
live MacBook server JSON (utilization_5h: 36%, utilization_7d: 34%,
representative_claim: five_hour, overage: rejected) merged into D83
dashboard.html. Identifying IPs / hostnames / Tailscale nodes redacted
from rendered output per public-repo hygiene rule (cc-rules AGENTS.md).
(6) docs/exit-gates/phase-5-e2e.json — sanitized record of the Live
MacBook E2E verification (exit-gate item 9). Confirms quota_v2 shape
produced live, anthropic probe returned 12/13 fields (overage-reset
absent per audit memory — only fires on active overage), opt-in
mechanism verified end-to-end (config flag flipped → server probed
→ dashboard renders). Post-test cleanup noted: temp owner key
revoked, config restored to baseline, test server terminated.
Remaining exit-gate items for the v0.5.0 close PR (maintainer-triggered):
- CHANGELOG.md "Unreleased" → "## v0.5.0 — <date>" promotion
- package.json 0.4.4 → 0.5.0
- CLAUDE.md release_kit.phase_rolling_mode: Phase 5 → Phase 6,
0.5.0-phase5 → 0.6.0-phase6
- Tag v0.5.0 push (triggers .github/workflows/release.yml auto-release)
Authority cited:
- ADR 0012 § Exit gate items 3 + 9
- ADR 0012 Amendment 1 (D84 NO-GO rationale in Mistral row)
- ADR 0002 Amendment 8 + ADR 0013 (the constitutional context for the
Plan Usage section's "how it works" framing)
- D80 commit 82d2e1c (probe producer cited in API Endpoints table)
- D81 commit 5288493 (quota_v2 shape producer)
- D82 commit a41420d (dashboard UI consumer)
- D83 commit 2b07a3b (test coverage)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* docs: PR #56 fold-in — 3 maintainer findings (F1 doctor kind / F2 Mistral / F3 SPOT)
Maintainer review of PR #56 surfaced 3 valid accuracy issues. Folding in.
F1 [P2] — README claim "fix_oauth on 401/403, fix_provider on 429/network"
is wrong. The anthropic.quota_probe_reachable check has category: 'provider'
(anthropic.mjs:999), so deriveKind() at lib/doctor.mjs:464 maps ALL failures
to fix_provider regardless of underlying HTTP status. Furthermore, _probeOnce
collapses 401/403 → null before reaching the doctor aggregate layer
(anthropic.mjs:451), so the HTTP status isn't observable to deriveKind at
all. README would have steered AI-repair loops toward an unreachable
discriminator.
Fix: README now accurately says all probe failures discriminate to
kind: fix_provider, with the actionable text inside human_steps[] being
auth-aware (re-login recipe for OAuth failures, wait-and-retry for
rate-limit). Note that splitting the check across the provider/auth
category boundary would let fix_oauth fire for OAuth-class failures
specifically; deferred to v1.x pending consumer-reported ambiguity.
F2 [P2] — README + ADR 0012 Amendment 1 said Mistral has "no programmatic
quota API; only web console". Maintainer pointed to Mistral's Admin API
(https://docs.mistral.ai/admin/security-access/admin-api) which DOES
expose Billing and Usage queries — just gated to org-admin-scoped keys.
The D84 NO-GO conclusion is still correct: OLP's deployment posture
(maintainer's personal Le Chat Pro account, trusted-LAN per ADR 0011)
uses Vibe / Le Chat member / La Plateforme keys, NOT org-admin keys.
Provisioning + storing an org-admin token raises the credential-scope
ceiling beyond the trusted-LAN design.
Fix: tightened wording in 3 places (README Supported Providers table,
README Plan Usage provider coverage table, ADR 0012 Amendment 1) to
say "no public quota endpoint accessible to Vibe / Le Chat member /
La Plateforme API keys" + acknowledge the Admin API surface + cite it
as a forward re-entry point if OLP scope expands to org-admin context.
F3 [P3] — Supported Providers table claims it's re-generated from
models-registry.json, but the new "Quota probe (v0.5.0+)" column has
values for OpenAI/Mistral/TBD that aren't in the registry (registry only
had quota_probe.anthropic block before this PR).
Fix: closed the SPOT drift formally by adding quota_probe.openai and
quota_probe.mistral entries to the registry with {status, reason,
re_entry_point} for each, plus an admin_api_reference for Mistral. Also
added explicit "status": "live" field to quota_probe.anthropic for
symmetry. Tightened README's source-of-truth statement to name BOTH
the providers.<key> block (model metadata) and quota_probe.<key> block
(probe status/reason/source).
This makes the column fully derivable from the registry — when D84 ever
becomes GO (Mistral Admin API integration, or OpenAI publishes a quota
endpoint), the registry is the single edit point.
Test impact: 756/756 still pass. Suite 37g (registry presence + 13 fields
for anthropic) unchanged; the new openai/mistral quota_probe entries are
additive and don't break any consumer.
Authority:
- F1: lib/doctor.mjs:464 deriveKind logic + anthropic.mjs:999 category
- F2: https://docs.mistral.ai/admin/security-access/admin-api + ADR 0011
trusted-LAN deployment context for the "out of scope" framing
- F3: CLAUDE.md release_kit overlay § "Supported Providers table sourced
from models-registry.json" — same SPOT discipline applies to the new
D81 column
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: dtzp555 <dtzp555@gmail.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
197 lines
8.1 KiB
JSON
197 lines
8.1 KiB
JSON
{
|
|
"version": "0.1.0-bootstrap",
|
|
"comment": "OLP models registry — SPOT for (provider, model) → metadata per CLAUDE.md release_kit overlay. v0.1 founding shipped zero Enabled Providers per ALIGNMENT.md § Provider Inventory. D4 populates providers.anthropic as Candidate; D5 transitions to Enabled pending E2E audit. Schema validated by .github/workflows/alignment.yml; provider keys must match ALIGNMENT.md inventory.",
|
|
"quota_probe": {
|
|
"schema_version": "2026-05-26",
|
|
"comment": "D81 — ADR 0013 Rule 5 mandate: schema_version pinned in registry so downstream consumers can detect schema drift. fields_pinned is load-bearing: if Anthropic adds/renames a header, dashboard consumers comparing field-presence against this list can flag 'schema drift detected'. Last verified: 2026-05-26 via live probe against api.anthropic.com (Path B per ADR 0013 Rule 5).",
|
|
"anthropic": {
|
|
"status": "live",
|
|
"source": "anthropic-ratelimit-unified-headers",
|
|
"endpoint": "https://api.anthropic.com/v1/messages",
|
|
"fields_pinned": [
|
|
"status",
|
|
"representative_claim",
|
|
"reset",
|
|
"fallback_percentage",
|
|
"status_5h",
|
|
"utilization_5h",
|
|
"reset_5h",
|
|
"status_7d",
|
|
"utilization_7d",
|
|
"reset_7d",
|
|
"overage_status",
|
|
"overage_disabled_reason",
|
|
"overage_reset"
|
|
]
|
|
},
|
|
"openai": {
|
|
"status": "unavailable",
|
|
"reason": "no public quota endpoint exposed by the openai/codex CLI; audit-derived spend tracking only at v0.5.0",
|
|
"re_entry_point": "lib/providers/openai.mjs DL-N (when OpenAI publishes a documented quota endpoint)"
|
|
},
|
|
"mistral": {
|
|
"status": "unavailable",
|
|
"reason": "no public quota endpoint accessible to Vibe / Le Chat member / La Plateforme API keys per D84 spike 2026-05-26 (https://docs.mistral.ai/api). Mistral Admin API exposes billing/usage but requires org-admin scope (out of scope for OLP family-tier deployment).",
|
|
"re_entry_point": "lib/providers/mistral.mjs DL-7 (when Mistral publishes a member-key-accessible usage endpoint, or when OLP scope expands to admin-key deployment)",
|
|
"admin_api_reference": "https://docs.mistral.ai/admin/security-access/admin-api"
|
|
}
|
|
},
|
|
"bootstrapCreated": 1778630400,
|
|
"bootstrapCreatedComment": "Fallback Unix timestamp for models whose precise release date is unknown. Value = 2026-05-13 (the day before the Anthropic billing-split announcement that triggered OLP). Used by handleModels() in server.mjs when a model entry does not have a model-level 'created' field. Per F12 round-5 cold-audit: OpenAI spec treats 'created' as a stable per-model attribute; synthesizing Date.now() on each request causes spurious updates for clients caching models by 'created'.",
|
|
"providers": {
|
|
"anthropic": {
|
|
"displayName": "Anthropic Claude",
|
|
"tier": "D",
|
|
"candidate": true,
|
|
"models": [
|
|
{
|
|
"id": "claude-opus-4-7",
|
|
"displayName": "Claude Opus 4.7",
|
|
"contextWindow": 200000,
|
|
"deprecated": false,
|
|
"created": 1782864000
|
|
},
|
|
{
|
|
"id": "claude-sonnet-4-6",
|
|
"displayName": "Claude Sonnet 4.6",
|
|
"contextWindow": 200000,
|
|
"deprecated": false,
|
|
"created": 1775001600
|
|
},
|
|
{
|
|
"id": "claude-haiku-4-5",
|
|
"displayName": "Claude Haiku 4.5",
|
|
"contextWindow": 200000,
|
|
"deprecated": false,
|
|
"created": 1769904000
|
|
}
|
|
],
|
|
"aliases": {
|
|
"claude": "claude-sonnet-4-6",
|
|
"sonnet": "claude-sonnet-4-6",
|
|
"opus": "claude-opus-4-7",
|
|
"haiku": "claude-haiku-4-5"
|
|
}
|
|
},
|
|
"openai": {
|
|
"displayName": "OpenAI Codex",
|
|
"tier": "D",
|
|
"candidate": true,
|
|
"comment": "Model IDs sourced from canonical Codex models doc (https://developers.openai.com/codex/models, retrieved 2026-05-23). Each id is documented as a `codex -m <id>` example on that page. D7 E2E will probe each one.",
|
|
"models": [
|
|
{
|
|
"id": "gpt-5.5",
|
|
"displayName": "GPT-5.5",
|
|
"contextWindow": null,
|
|
"deprecated": false,
|
|
"note": "Frontier recommended model. Docs example: `codex -m gpt-5.5`.",
|
|
"created": 1778630400
|
|
},
|
|
{
|
|
"id": "gpt-5.4",
|
|
"displayName": "GPT-5.4",
|
|
"contextWindow": null,
|
|
"deprecated": false,
|
|
"note": "Docs example: `codex -m gpt-5.4`.",
|
|
"created": 1778630400
|
|
},
|
|
{
|
|
"id": "gpt-5.4-mini",
|
|
"displayName": "GPT-5.4 Mini",
|
|
"contextWindow": null,
|
|
"deprecated": false,
|
|
"note": "Lower-cost gpt-5.4 variant. Docs example: `codex -m gpt-5.4-mini`.",
|
|
"created": 1778630400
|
|
},
|
|
{
|
|
"id": "gpt-5.3-codex",
|
|
"displayName": "GPT-5.3-Codex",
|
|
"contextWindow": null,
|
|
"deprecated": false,
|
|
"note": "Docs example: `codex -m gpt-5.3-codex`. Distinct from the -spark variant.",
|
|
"created": 1778630400
|
|
},
|
|
{
|
|
"id": "gpt-5.3-codex-spark",
|
|
"displayName": "GPT-5.3-Codex Spark",
|
|
"contextWindow": null,
|
|
"deprecated": false,
|
|
"note": "Research preview. Docs example: `codex -m gpt-5.3-codex-spark`.",
|
|
"created": 1778630400
|
|
}
|
|
],
|
|
"aliases": {
|
|
"codex": "gpt-5.3-codex",
|
|
"codex-spark": "gpt-5.3-codex-spark",
|
|
"gpt5": "gpt-5.5",
|
|
"gpt5-mini": "gpt-5.4-mini"
|
|
}
|
|
},
|
|
"mistral": {
|
|
"displayName": "Mistral Vibe",
|
|
"tier": "D",
|
|
"candidate": true,
|
|
"comment": "Model IDs sourced from canonical Mistral models registry (https://docs.mistral.ai/getting-started/models/models_overview, retrieved 2026-05-23). Each id is the date-stamped canonical form Mistral's own model registry uses. The short forms (devstral-2, devstral-small-2) are aliases used in Vibe's config.toml TOML examples and are exposed as user-facing aliases below. Both models have 262144-token context window per the canonical registry + DOCS-5 launch announcement.",
|
|
"models": [
|
|
{
|
|
"id": "devstral-2-25-12",
|
|
"displayName": "Devstral 2",
|
|
"contextWindow": 262144,
|
|
"deprecated": false,
|
|
"note": "123B-parameter dense transformer. DOCS-5: $0.40/$2.00 per million tokens (input/output). Canonical date-stamped id; Vibe config.toml accepts the short form 'devstral-2' as an alias.",
|
|
"created": 1764547200
|
|
},
|
|
{
|
|
"id": "devstral-small-2-25-12",
|
|
"displayName": "Devstral Small 2",
|
|
"contextWindow": 262144,
|
|
"deprecated": false,
|
|
"note": "24B-parameter model, runs on consumer-grade GPUs. DOCS-5: $0.10/$0.30 per million tokens (input/output). Canonical date-stamped id; Vibe config.toml accepts the short form 'devstral-small-2' as an alias.",
|
|
"created": 1764547200
|
|
}
|
|
],
|
|
"aliases": {
|
|
"devstral": "devstral-2-25-12",
|
|
"devstral-2": "devstral-2-25-12",
|
|
"devstral-small": "devstral-small-2-25-12",
|
|
"devstral-small-2": "devstral-small-2-25-12"
|
|
}
|
|
},
|
|
"grok": {
|
|
"displayName": "xAI Grok",
|
|
"tier": "C",
|
|
"candidate": true,
|
|
"models": [],
|
|
"comment": "anticipated Phase 8+; no canonical models pinned yet"
|
|
},
|
|
"kimi": {
|
|
"displayName": "Moonshot Kimi",
|
|
"tier": "C",
|
|
"candidate": true,
|
|
"models": [],
|
|
"comment": "anticipated Phase 8+; no canonical models pinned yet"
|
|
},
|
|
"minimax": {
|
|
"displayName": "MiniMax",
|
|
"tier": "B",
|
|
"candidate": true,
|
|
"models": [],
|
|
"comment": "anticipated Phase 8+; no canonical models pinned yet"
|
|
},
|
|
"glm": {
|
|
"displayName": "Zhipu GLM",
|
|
"tier": "B",
|
|
"candidate": true,
|
|
"models": [],
|
|
"comment": "anticipated Phase 8+; no canonical models pinned yet"
|
|
},
|
|
"qwen": {
|
|
"displayName": "Alibaba Qwen",
|
|
"tier": "B",
|
|
"candidate": true,
|
|
"models": [],
|
|
"comment": "anticipated Phase 8+; no canonical models pinned yet"
|
|
}
|
|
}
|
|
}
|