Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions PARITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@
| **Auth modes (4-axis)** | `Auth` trait with 7 combinators: Bearer, Header, Remove, Custom, Optional, Config, OrElse. Chainable: `Auth.optional(key).orElse(Auth.config(env)).pipe(Auth.header("x-api-key"))`. | opencode (`packages/llm/src/route/auth.ts:25-38`) | `auth_mode.rs` (old) → `jcode-llm-core/src/auth.rs` (new Auth trait) | 🔜 | New Auth trait pending in workflow (agent a7f..4a4) |
| **Route composition** | 4-axis: Protocol (wire format) + Endpoint (baseURL+path) + Auth + Framing/Transport (SSE/AWS-EventStream/WS). Provider = 1 Route.make(...) call. | opencode (`packages/llm/src/route/client.ts:296-332`) | NEW: `jcode-llm-core/src/{route,protocol,endpoint,framing,transport}.rs` | 🔜 | New Route/Framing pending in workflow |
| **Canonical schema** | `LlmRequest`, `LlmEvent` (15 variants), `Usage` (inclusive + non-overlapping breakdown), `LlmError` (9 tagged reasons with HttpContext). All Schema-plugged. | opencode (`packages/llm/src/schema/{messages,events,errors}.ts`) | NEW: `jcode-llm-core/src/schema.rs` | 🔜 | New schema types pending in workflow (agent a7f..a4a) |
| **Provider failover** | Reactive failover: detect RateLimit/503/529 → walk configurable `FailoverChain` → switch model + inject explanation prompt. | oh-my-openagent (`model-error-classifier.ts:9-35`), oh-my-pi (`rate-limit-utils.ts:30-93`) | `failover.rs`: `FailoverDecision`, `ErrorCode` (existing); bead 7.3 new reactive walker pending | ⚠️ | Existing failover.rs classifies error only. New reactive walker in Phase 7 (bead pjm.3) |
| **Provider failover** | Reactive failover: detect RateLimit/503/529 → walk configurable `FailoverChain` → switch model + inject explanation prompt. | oh-my-openagent (`model-error-classifier.ts:9-35`), oh-my-pi (`rate-limit-utils.ts:30-93`) | NEW: `failover_walker.rs` (failover state machine, cooldowns, equivalence checks, 11 tests) | ⚠️ → ✅ | `ReactiveFailoverWalker` in `jcode-provider-core` built + tested. Integration into streaming loop in P7. |
| **Model selection** | Resolve `ModelRef` from user config → Catalog lookup → credential resolution → route construction. Per-agent model override. Single global default. | opencode (`packages/core/src/session/runner/model.ts:141-166`) | `selection.rs` (old 8 ActiveProvider) → Phase 6 Catalog + Integration service (new) | 🔜 | New Catalog/Integration in Phase 6 (bead gqw.1-6.3) |
| **Model catalog** | Auto-bootstrap from `models.dev` JSON. 5-min disk cache, 7-day fingerprint, Flock file lock. 21+ providers with model list + cost + capabilities. | opencode (`packages/core/src/models-dev.ts`), oh-my-openagent (`models.dev`) | `catalog_refresh.rs` (old) → `jcode-models-dev` crate (new) | 🔜 | New models-dev crate in Phase 6 (bead gqw.3) |
| **Pricing** | Token-based pricing calculator with per-model rates, cache read pricing, cost estimation. — Unchanged from existing. | pi-agent-rust (cost tracking) | `pricing.rs` (unchanged) | ✅ | — |
Expand All @@ -549,7 +549,7 @@
| **TUI /model** | `/model` command: list 50+ models with cost + capabilities, filter by provider, set default. Persists to config.toml. | opencode TUI | NEW: `jcode-tui-model/` (Phase 6) | ❌ | Bead gqw.5 |
| **Model persistence** | Default model survives restarts. Config `default_model` is read on `Agent::new()` and `new_with_session()` before any hardcoded env var. Works for both client and server restart. | opencode (config persistence) | `agent.rs:370-385`: `config().provider.default_model` applied to provider before `build_base()` | ✅ | Fixed 2026-06-18, both constructors patched |
| **VCR cassettes** | 50+ recorded-replay cassettes. 3 common use cases (basic text, tool_use, streaming) per provider. Cassette ≤ 200KB, total ≤ 10MB. | opencode (`packages/llm/test/fixtures/recordings/`) | NEW: `crates/jcode-llm-vcr/tests/fixtures/<provider>/<use_case>.json` | 🔜 | Phase 7 (bead 7.4) |
| **Reactive failover walker** | On first retryable error per request, walk `FailoverChain` to next entry. Cooldown 300s. Prompt injection explaining the switch. | oh-my-openagent (`event-model-fallback.ts:96-116`) | NEW: `jcode-app-core/src/stream_completion.rs` (Phase 7) | 🔜 | Bead pjm.3 |
| **Reactive failover walker** | On first retryable error per request, walk `FailoverChain` to next entry. Cooldown 300s. Prompt injection explaining the switch. | oh-my-openagent (`event-model-fallback.ts:96-116`) | NEW: `failover_walker.rs` in `jcode-provider-core` (536 lines, 11 tests, cooldowns, equivalence checks, internally-aborted tracking) | | Walker built + tested. Integration into app-core streaming loop pending (Phase 7). |
| **Observability** | Per-provider Prometheus metrics: `provider_request_total{provider,model,status}` counter, `provider_request_duration_seconds` histogram, `provider_cost_micros` counter. Exported at /metrics. | — | NEW: extend `jcode-telemetry-core/` (Phase 7) | 🔜 | Bead pjm.8 |
## X. Plugin System

Expand Down
Loading
Loading