LLM Access on Pennsieve Compute Nodes
Pennsieve compute nodes can optionally provide processors with access to AI models (Claude) hosted on AWS Bedrock. All access goes through a governed proxy that enforces model restrictions, budget limits, and usage tracking.
How It Works
Processor ──invoke──► LLM Governor ──► AWS Bedrock (Claude)
│
├─ Model allow-list check
├─ Budget enforcement
├─ Usage tracking
└─ File access scoping
Processors never call Bedrock directly. The governor Lambda validates every request before forwarding it to Bedrock and records usage afterward.
Available Models
| Model | Best For | Input Cost | Output Cost |
|---|---|---|---|
| Claude Haiku 4.5 | Fast tasks: classification, extraction, simple Q&A | $0.80 / 1M tokens | $4.00 / 1M tokens |
| Claude Sonnet 4.6 | Analysis, summarization, complex reasoning | $3.00 / 1M tokens | $15.00 / 1M tokens |
1 million tokens is roughly 750,000 words or ~3,000 pages of text.
Quick Start (Go SDK)
Install the SDK:
go get github.com/pennsieve/pennsieve-go-llm
Basic usage:
import "github.com/pennsieve/pennsieve-go-llm/llm"
gov := llm.NewGovernor()
// Simple text prompt
answer, err := gov.Ask(ctx, llm.ModelHaiku45, "Summarize this dataset")
// With system prompt
answer, err := gov.AskWithSystem(ctx, llm.ModelHaiku45,
"You are a data analyst.",
"What patterns do you see in this data?")
// Check if LLM access is available
if gov.Available() {
// LLM access is configured
}
The SDK reads LLM_GOVERNOR_FUNCTION and EXECUTION_RUN_ID from the environment automatically — these are set by the platform.
Sending Files
resp, err := gov.Invoke(ctx, &llm.InvokeRequest{
Model: llm.ModelHaiku45,
System: "You are a data analyst.",
Messages: []llm.Message{
llm.UserMessage(
llm.TextBlock("Summarize the attached document"),
llm.DocumentBlock("report", "pdf", base64Data),
),
},
})
fmt.Printf("Response: %s\nCost: $%.4f\n", resp.Text(), resp.Usage.EstimatedCostUsd)
| Content Type | Builder | Notes |
|---|---|---|
| Text | llm.TextBlock(text) | Plain text |
| Document | llm.DocumentBlock(name, format, base64Data) | PDF, CSV, TXT, HTML, DOC, DOCX, XLS, XLSX |
| Image | llm.ImageBlock(format, base64Data) | PNG, JPEG, GIF, WEBP |
| EFS File | llm.FileBlock(path) | Reads file from disk (secure/compliant modes only) |
Maximum file size: 20 MB per file.
Budget Controls
Every compute node has a configurable budget that caps Bedrock spend:
- Period budget: Daily or monthly cap for the entire compute node (default: $5/day)
- Execution budget: Optional per-workflow cap (set per request via
executionBudgetUsd) - Both are checked before each Bedrock call — if the budget would be exceeded, the request is rejected without making an API call
Budget is adjustable at runtime without redeployment.
Error Handling
resp, err := gov.Invoke(ctx, req)
if err != nil {
if ge, ok := llm.IsGovernorError(err); ok {
switch {
case ge.IsBudgetExceeded():
// Budget limit reached — wait for reset or increase budget
case ge.IsModelNotAllowed():
// Model not in allow-list
case ge.IsProviderNotAllowed():
// Non-Anthropic model in secure/compliant mode
case ge.IsThrottled():
// Bedrock rate limit — retry after ge.RetryAfterSec
}
}
}
Cost
See Cost Estimates for model pricing and example workflow costs.
Data Privacy
- Anthropic models do not train on your data (contractual guarantee on AWS Bedrock)
- In secure and compliant modes, only Anthropic models are allowed
- File access is scoped to the current execution — processors cannot read other executions' files
- Every call is recorded with token counts and estimated cost
For the full technical details, see the detailed LLM access guide.
Updated about 3 hours ago