WI-058 · Platform & Contracts · provider-adapters

Provider adapters + live tests (OpenAI + 2nd cloud + local stub)

queued P1 medium risk   Owner: Paul   Reviewer: Mark Hilleary   0% · 0/1 tasks complete

Gates: P2 Requirements: Updated: 2026-06-22

At a glance

CodeWI-058
PhasePlatform & Contracts
Order19 of 93
Story points8
Primary surfaceOpenAI/Gemini/Claude adapters + local stub + live integration tests
Retires
Depends onProvider gateway + adapter boundary — core (registry, capability, schema+prompt compiler, image prep, ProviderAttempt)
Blocks
Evidence
queued (P2 adapters)

Goals

Implement the concrete provider adapters on the WI-011 boundary and prove them on real photos — at least two cloud providers populate the P1 canonical draft via native structured output, with recorded cost; a local stub proves the contract.

Implementation — what to build

Adapters

  • OpenAI (native JSON schema) + a second cloud (Gemini or Claude) + stub local adapter on the LocalVisionRuntime contract; each compile→invoke→decode→normalize to the canonical draft.

Tests (deterministic)

  • Recorded native-response fixtures per adapter: success, refusal, truncation, malformed, rate-limit, timeout, missing usage.

Tests (live, budget-capped)

  • Shared versioned photo set: item_scan + mark_scan per cloud provider; table_hunt on ≥2 (overlays); room_scan on ≥1; dedicated dev project; per-run cost ceiling; excluded from normal unit tests.

Acceptance

  • Same P1 request through multiple providers yields comparable canonical drafts with recorded cost/latency; consumable by P3.

Checklist

  • P2 Provider-adapter boundary normalizes OpenAI, Gemini, Claude, and local VLMs into one canonical result via strict structured output.

Gates & testing

  • P2 Provider-adapter boundary normalizes OpenAI, Gemini, Claude, and local VLMs into one canonical result via strict structured output.
    CODE TEST HITL QA 💲 API COST

Requirements

No linked requirements.

Verify (done when)

≥2 cloud adapters (OpenAI + Gemini/Claude) + a stub local adapter implemented; deterministic recorded-response tests pass for each; live item_scan + mark_scan succeed on every cloud provider; table_hunt on ≥2 providers with renderable 0–1000 overlays; room_scan on ≥1; live tests separately enabled + budget-capped. Per spec §26/§29 (adapter rows).

Cost triggers

💲 API COST

First real paid API spend: live multi-provider vision (OpenAI/Gemini/Claude). Bounded by P8 budgets.

Status & editing

queued   Sprint: P&C Wave 3: Vision Pipeline & Cost

Edit status / sprint on the ★ Live Board → — changes are logged live with who / when / why.

Human-in-the-loop

No human tasks linked.

Findings

None recorded yet.

Concerns

None recorded yet.

Risks

None recorded yet.

Tech debt

None recorded yet.

Tools used

No tool calls recorded.

Files & artifacts

No files / artifacts recorded.

Update log

No log entries yet.