Skip to content

feat(core): add experimental ai-sdk-agent provider - #1495

Closed
christso wants to merge 1 commit into
mainfrom
ai-sdk-agent-provider
Closed

christso wants to merge 1 commit into
mainfrom
ai-sdk-agent-provider

Conversation

@christso

Copy link
Copy Markdown
Collaborator

Summary

AgentV can now run an experimental provider: ai-sdk-agent target that uses Vercel AI SDK model/tool-calling primitives as a coding-agent loop rather than a one-shot LLM call. The provider owns the minimal repo tools (read, write, exact-string edit, and bounded bash) and lazy-loads ai / @ai-sdk/openai only when the target is invoked, falling back to a managed ~/.agentv/deps/ai-sdk-agent install path.

The target config accepts OpenAI-compatible base_url, api_key, model, optional temperature, max_steps, tools, system_prompt, and grader_target, with docs marking the provider as experimental.

Design Notes

  • max_steps is AgentV harness configuration, not Vercel case metadata. The Vercel AI SDK exposes primitives; AgentV supplies the bounded loop through stopWhen: stepCountIs(...).
  • ai and @ai-sdk/openai remain optional startup dependencies. The core and CLI bundles externalize them so normal AgentV startup does not require the AI SDK packages.
  • The first-slice edit tool intentionally supports exact string replacement only; richer patching is left for a later provider hardening pass.

Validation

  • bun --filter @agentv/core test test/evaluation/providers/ai-sdk-agent.test.ts test/evaluation/providers/targets.test.ts -> 74 pass, 0 fail.
  • bun --filter @agentv/core typecheck -> passed.
  • bun run lint -> passed across 759 files.
  • bun --filter @agentv/core build -> passed.
  • bun --filter @agentv/web build -> passed.
  • bun --filter agentv build -> passed. Existing warning: dashboard dist not found, skipped.
  • Fast AgentV smoke with provider: ai-sdk-agent -> passed in 8.76s, wrote /tmp/agentv-ai-sdk-smoke-run-bdvlTO/index.jsonl.
  • Next Evals OSS smoke, case agent-000-app-router-migration-simple, with AGENTV_SKIP_NEXT_CANARY_INSTALL=1 -> wrote /tmp/agentv-ai-sdk-next-run-FiBN5k/index.jsonl, no crash, wall time 28.35s, provider duration 18.862s, score 0%.
  • Same Next smoke without skipping the setup hook's next@canary install -> wrote /tmp/agentv-ai-sdk-next-run-keC0R7/index.jsonl, no crash, wall time 250.31s, provider duration 54.880s, score 0%.

Known Limitations

  • Quality parity with Vercel's harness is not there yet. The smoke row scored 0% because the grader reported Vitest reported no tests.
  • Tooling is intentionally minimal: no grep/find/list tool, no structured patch tool, no persistent agent memory, and no Vercel-specific harness affordances beyond the simple loop.
  • Local OpenAI-compatible endpoint usage did not report token usage in the smoke results, so token counts were zero even though the mapping is implemented when usage is available.

Post-Deploy Monitoring & Validation

  • Log/search terms: ai-sdk-agent, deps/ai-sdk-agent, requires the Vercel AI SDK packages, unsupported tool, old_string was not found, EPIPE, ERR_STREAM_DESTROYED.
  • Metrics to watch: eval row execution_status, provider duration_ms, tool_call_counts, steps.toolCallCount, crash/error counts, and managed dependency install failures.
  • Healthy signals: target validation accepts documented fields; runs write index.jsonl; rows finish with execution_status: ok; bash-heavy runs do not crash on closed pipes; normal AgentV startup works without local ai installed.
  • Failure signals: dependency load errors in ordinary startup, unhandled bash stream errors, missing index.jsonl, repeated provider timeouts, or one-case Next smoke exceeding 4 minutes when the canary install hook is excluded.
  • Validation window and owner: PR author/reviewer should watch the first CI run and the next local Next Evals smoke before widening the provider beyond experimental use.

Compound Engineering
GPT-5

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 849c595
Status: ✅  Deploy successful!
Preview URL: https://fa12e201.agentv.pages.dev
Branch Preview URL: https://ai-sdk-agent-provider.agentv.pages.dev

View logs

@christso

Copy link
Copy Markdown
Collaborator Author

Closing as not planned for this slice. The Next Evals OSS parity target is @vercel/agent-eval’s built-in codex agent, which runs the Codex CLI (@openai/codex) in a sandbox. It is not an AI SDK tool-loop harness. AgentV should prioritize Codex CLI harness parity instead of adding ai-sdk-agent as a Next Evals parity provider.

@christso christso closed this Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant