Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownProvider = errors.New("provider: unknown provider") ErrRateLimit = errors.New("provider: rate limit exceeded") ErrContextTooLong = errors.New("provider: input exceeds model context window") ErrModelNotSupported = errors.New("provider: model not supported by this provider") ErrTimeout = errors.New("provider: request timed out") )
Functions ¶
Types ¶
type PlainTextEmitter ¶ added in v0.9.0
type PlainTextEmitter interface {
Provider
EmitsPlainText()
}
PlainTextEmitter is the marker interface for providers whose Review() returns formatted plain text instead of the structured findings JSON the API providers contract. The review pipeline uses this to short-circuit JSON parsing, retry-once, and the cards/markdown renderer — the response is emitted to stdout verbatim because the CLI tool has already formatted it.
CLI-based providers (claude-cli, gemini-cli, codex-cli) implement this so they can pass through their host CLI's output without the JSON-contract enforcement that API providers do via native structured-output mechanisms (tool_use / response_format / response_schema).
type Pricing ¶
type Provider ¶
type Request ¶
type Request struct {
Model string
SystemPrompt string
UserPrompt string
Lang string
MaxTokens int
// FreeForm requests an unstructured plain-text completion (ADR-0015).
// When true, API providers MUST skip their structured-output
// enforcement (Anthropic tool_choice, OpenAI response_format, Gemini
// responseSchema, Ollama format:json) and return the model's raw text
// in Response.Content. Default false preserves the ADR-0014
// structured-findings contract, so existing call sites are unaffected.
// Used by `--suggest-commit` to get a commit message instead of findings.
FreeForm bool
// ProviderOpts is an escape hatch (ADR-0001 risk #1) for features that
// don't fit the common interface, e.g. Anthropic prompt caching or
// OpenAI logprobs. Providers cast to their expected type; unknown values
// are ignored.
ProviderOpts any
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package claudecli registers a CLI-tool-backed provider that drives Anthropic's Claude Code (`claude`) binary as the review engine.
|
Package claudecli registers a CLI-tool-backed provider that drives Anthropic's Claude Code (`claude`) binary as the review engine. |
|
Package clireview is the shared implementation of CLI-tool-backed review providers.
|
Package clireview is the shared implementation of CLI-tool-backed review providers. |
|
Package cohere implements the Provider interface against Cohere's OpenAI-compatibility endpoint (https://api.cohere.ai/compatibility/v1), reusing the openai-go SDK — no new dependency.
|
Package cohere implements the Provider interface against Cohere's OpenAI-compatibility endpoint (https://api.cohere.ai/compatibility/v1), reusing the openai-go SDK — no new dependency. |
|
Package deepseek implements the Provider interface against DeepSeek's OpenAI-compatible Chat Completions API.
|
Package deepseek implements the Provider interface against DeepSeek's OpenAI-compatible Chat Completions API. |
|
Package geminicli registers a CLI-tool-backed provider that drives Google's Gemini CLI (`gemini`) binary as the review engine.
|
Package geminicli registers a CLI-tool-backed provider that drives Google's Gemini CLI (`gemini`) binary as the review engine. |
|
Package mistral implements the Provider interface against Mistral's OpenAI-compatible Chat Completions API (https://api.mistral.ai/v1), reusing the openai-go SDK — no new dependency.
|
Package mistral implements the Provider interface against Mistral's OpenAI-compatible Chat Completions API (https://api.mistral.ai/v1), reusing the openai-go SDK — no new dependency. |
Click to show internal directories.
Click to hide internal directories.