Skip to content

config: support Anthropic, OpenAI, Gemini, and OpenCode Zen providers#20

Merged
benvinegar merged 2 commits into
mainfrom
benvinegar/model-providers
Feb 17, 2026
Merged

config: support Anthropic, OpenAI, Gemini, and OpenCode Zen providers#20
benvinegar merged 2 commits into
mainfrom
benvinegar/model-providers

Conversation

@benvinegar
Copy link
Copy Markdown
Member

Adds direct support for four LLM providers. Set at least one API key.

Providers:

Provider Env var Coding model Triage model
Anthropic ANTHROPIC_API_KEY claude-opus-4-6 claude-haiku-4-5
OpenAI OPENAI_API_KEY gpt-5.3-codex gpt-5-mini
Google Gemini GEMINI_API_KEY gemini-3-pro-preview gemini-3-flash-preview
OpenCode Zen OPENCODE_ZEN_API_KEY claude-opus-4-6 claude-haiku-4-5

Changes:

  • .env.schema: add ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY
  • start.sh: auto-detect provider from env, pass --model to pi
  • install.sh: prompt for all four providers (all optional, warns if none set)
  • settings.json: remove hardcoded defaultProvider/defaultModel
  • CONFIGURATION.md: document all four providers
  • Control-agent skill: model selection tables for dev-agent and sentry-agent spawning
  • CI scripts: updated simulated input for new prompt order

- Add ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY to .env.schema
- OPENCODE_ZEN_API_KEY no longer required (any one provider suffices)
- start.sh auto-detects provider and picks model:
  - Orchestration/coding: opus-4-6 / gpt-5.3-codex / gemini-3-pro
  - Triage (sentry): haiku-4-5 / gpt-5-mini / gemini-3-flash
- install.sh prompts for all four providers
- Remove hardcoded defaultProvider/defaultModel from settings.json
- Update control-agent skill with model selection tables
- Update CI simulated input for new prompt order
@benvinegar benvinegar force-pushed the benvinegar/model-providers branch from 3721620 to ac3b8e6 Compare February 17, 2026 12:29
| `OPENCODE_ZEN_API_KEY` | `opencode-zen/claude-haiku-4-5` |

```bash
tmux new-session -d -s sentry-agent "export PATH=\$HOME/.varlock/bin:\$HOME/opt/node-v22.14.0-linux-x64/bin:\$PATH && export PI_SESSION_NAME=sentry-agent && varlock run --path ~/.config/ -- pi --session-control --skill ~/.pi/agent/skills/sentry-agent --model <MODEL_FROM_TABLE_ABOVE>"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The SKILL.md file contains conflicting instructions for spawning sentry-agent, with an outdated section hardcoding a model that will fail if its specific API key is not set.
Severity: HIGH

Suggested Fix

Remove the old "## Sentry Agent" section from pi/skills/control-agent/SKILL.md entirely. Retain only the updated "### Spawning sentry-agent" section that includes the model selection table and uses the <MODEL_FROM_TABLE_ABOVE> placeholder.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: pi/skills/control-agent/SKILL.md#L359

Potential issue: The documentation file `pi/skills/control-agent/SKILL.md` contains two
conflicting sets of instructions for spawning the `sentry-agent`. An older section
includes a command that hardcodes the model to `opencode-zen/claude-haiku-4-5`. A newer
section, introduced by this pull request, provides instructions for dynamic model
selection based on available API keys. If an operator follows the older, hardcoded
instructions and the `OPENCODE_ZEN_API_KEY` is not configured, the `sentry-agent` will
fail to start, even if other provider keys are available. This creates documentation
duplication and a risk of incorrect deployment.

Did we get this right? 👍 / 👎 to inform future reviews.

@benvinegar benvinegar merged commit 49f8ba6 into main Feb 17, 2026
8 checks passed
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