Agentic.LLM.Provider.CodingAgentBase
(agentic v0.3.0)
Copy Markdown
Macro that synthesizes a catalog-only Agentic.LLM.Provider
implementation for an ACP-compatible coding-agent CLI (Cursor,
Gemini CLI, Goose, GitHub Copilot, Kimi, Qwen, …).
These agents all route to one or more of the big frontier model families internally — most expose Anthropic Claude, OpenAI GPT, and Google Gemini. We surface them in the Catalog as alternative pathways for those same canonical model families so the multi-pathway router can score them alongside Anthropic-direct, OpenRouter, etc.
Usage
defmodule Agentic.LLM.Provider.Cursor do
use Agentic.LLM.Provider.CodingAgentBase,
id: :cursor,
cli_name: "cursor-agent",
label: "Cursor",
# Optional — defaults to the frontier coding set below.
# Each tuple is {provider_local_id, label, tier, ctx_window}
model_overrides: [...]
endWhy a macro
Per-agent modules get a single place each (~5 lines) and the
shared catalog/availability machinery lives here. Adding a new
detected agent is a trivial PR. The model list defaults are
intentionally a small "frontier coding" set — agents that route
exclusively to one family override model_overrides.
Summary
Functions
Builds a [Model.t()] from a seed list. Called by the generated
default_models/0 in each per-agent wrapper. Public so the macro
can emit a call to it without escaping the seed list (which would
mangle 4-tuples through the AST representation).
Default model seeds used by every ACP coding agent that doesn't
override them. Mirrors what Agentic.LLM.Provider.OpenCode
declared — the canonical_id mapping in Canonical then groups
these with their HTTP siblings.
Functions
@spec build_models(atom(), String.t(), [{String.t(), String.t(), atom(), integer()}]) :: [ Agentic.LLM.Model.t() ]
Builds a [Model.t()] from a seed list. Called by the generated
default_models/0 in each per-agent wrapper. Public so the macro
can emit a call to it without escaping the seed list (which would
mangle 4-tuples through the AST representation).
Default model seeds used by every ACP coding agent that doesn't
override them. Mirrors what Agentic.LLM.Provider.OpenCode
declared — the canonical_id mapping in Canonical then groups
these with their HTTP siblings.