---
title: internal/provider
description: Go API reference for the provider package.
---
# provider
```go
import "github.com/jbcom/radioactive-ralph/internal/provider"
```
Package provider adapts configured CLI backends into radioactive\_ralph's provider\-neutral worker execution contract.
## Index
- [type Binding](<#Binding>)
- [func ResolveBinding\(cfg config.File, local config.Local, \_ variant.Profile, fromConfig config.VariantFile\) \(Binding, error\)](<#ResolveBinding>)
- [type ClaudeRunner](<#ClaudeRunner>)
- [func \(ClaudeRunner\) Run\(ctx context.Context, binding Binding, req Request\) \(Result, error\)](<#ClaudeRunner.Run>)
- [type CodexRunner](<#CodexRunner>)
- [func \(CodexRunner\) Run\(ctx context.Context, binding Binding, req Request\) \(Result, error\)](<#CodexRunner.Run>)
- [type GeminiRunner](<#GeminiRunner>)
- [func \(GeminiRunner\) Run\(ctx context.Context, binding Binding, req Request\) \(Result, error\)](<#GeminiRunner.Run>)
- [type Request](<#Request>)
- [type Result](<#Result>)
- [type Runner](<#Runner>)
- [func NewRunner\(binding Binding\) \(Runner, error\)](<#NewRunner>)
## type [Binding]()
Binding is one resolved provider selection after repo config, local overrides, and per\-variant overrides have been applied.
```go
type Binding struct {
Name string
Config config.ProviderFile
}
```
### func [ResolveBinding]()
```go
func ResolveBinding(cfg config.File, local config.Local, _ variant.Profile, fromConfig config.VariantFile) (Binding, error)
```
ResolveBinding picks the provider for one variant.
## type [ClaudeRunner]()
ClaudeRunner executes a single \`claude \-p\` turn.
```go
type ClaudeRunner struct{}
```
### func \(ClaudeRunner\) [Run]()
```go
func (ClaudeRunner) Run(ctx context.Context, binding Binding, req Request) (Result, error)
```
Run shells out to the configured Claude CLI binding and returns the assistant text that accumulated before the result frame.
## type [CodexRunner]()
CodexRunner executes a single \`codex exec\` turn.
```go
type CodexRunner struct{}
```
### func \(CodexRunner\) [Run]()
```go
func (CodexRunner) Run(ctx context.Context, binding Binding, req Request) (Result, error)
```
Run executes one non\-interactive Codex turn.
## type [GeminiRunner]()
GeminiRunner executes a single \`gemini \-p\` turn.
```go
type GeminiRunner struct{}
```
### func \(GeminiRunner\) [Run]()
```go
func (GeminiRunner) Run(ctx context.Context, binding Binding, req Request) (Result, error)
```
Run executes one non\-interactive Gemini turn.
## type [Request]()
Request is the provider\-neutral execution contract for one worker turn.
```go
type Request struct {
WorkingDir string
SystemPrompt string
UserPrompt string
OutputSchema string
Model variant.Model
Effort string
AllowedTools []string
}
```
## type [Result]()
Result captures the observable output of one provider turn.
```go
type Result struct {
SessionID string
AssistantOutput string
}
```
## type [Runner]()
Runner executes one provider turn.
```go
type Runner interface {
Run(ctx context.Context, binding Binding, req Request) (Result, error)
}
```
### func [NewRunner]()
```go
func NewRunner(binding Binding) (Runner, error)
```
NewRunner returns the runtime implementation for a provider type.
Generated by [gomarkdoc]()