---
created: 2026-05-06
gap: G09
order: 10
severity: P1
category: provider-coverage
estimate: L
issue: "https://github.com/lidge-jun/agbrowse/issues/66"
depends_on: ['G01']
---

# G09 — Model-adapter surface for planner/extractor (vs Stagehand, browser-use)

> Severity **P1** · Category `provider-coverage` · Estimate **L** ·
> Tracking issue [#66](https://github.com/lidge-jun/agbrowse/issues/66) · Depends on **G01**

## GPT Pro evidence

Evidence (competitor side): URL: https://github.com/browser-use/browser-use — quote: “Can I use custom tools with the agent? Yes.” Browser Use exposes custom tools and model choices, while Stagehand documents model configuration for agent/tool execution. 
GitHub
+1

Evidence (agbrowse side): README.md:517-524 documents provider UI coverage for ChatGPT, Gemini, and Grok; no separate local planner/extractor LLM adapter contract is listed. 
GitHub

Why this matters: A planner and extractor need a stable JSON-producing model interface independent of live provider web UIs. Without it, local agent loops remain coupled to browser-provider DOM churn.
Proposed scope, respecting forbidden list:

web-ai/model-adapters/index.mjs — define minimal generateJson() and generateText() contracts.

web-ai/model-adapters/openai-compatible.mjs — optional BYO endpoint adapter; no hosted browser or stealth behavior.

web-ai/planner-loop.mjs — accept --llm-adapter for planning only, with schema validation.

web-ai/extract-schema.mjs — accept adapter-backed extraction with strict JSON validation.

skills/browser/browser.mjs — expose --planner-model and --extract-model flags as experimental.

structure/providers.md — distinguish web-UI providers from model adapters and forbid account-access guarantees.
Test surface: test/unit + test/integration.
cli-jaw mirror impact: parity optional until cli-jaw exposes planner/extractor model flags.
Acceptance gate: add gate:model-adapter-contracts; keep provider fail-closed gates.
Estimate: L, 4+ days.

## Diff-level work breakdown

> Fill in concrete diffs (NEW / MODIFY / DELETE with file:line) once this gap
> reaches the active sprint. Until then, the bullets in **Proposed scope**
> above are the agreed shape; do not implement before the depending gaps
> (G01) ship and `gate:all` stays green.

### NEW files
- _to be filled before implementation_

### MODIFY
- _to be filled before implementation_

### DELETE
- _to be filled before implementation_

## Tests
- `test/unit/...` — _list test files once written_

## Truth-table update
- `structure/CAPABILITY_TRUTH_TABLE.md` — add row or update status when this
  gap reaches `ready` in agbrowse.
- `cli-jaw/structure/CAPABILITY_TRUTH_TABLE.md` — mirror entry per the
  `cli-jaw mirror impact` line above.

## Release gates touched
- Existing: `gate:typecheck`, `gate:tests`, `gate:truth-table-fresh`,
  `gate:mcp-scope-frozen`, `gate:no-experimental-in-readme-ready-section`.
- Added by this gap: see **Acceptance gate** in the GPT Pro evidence block.
