authsome run --, or call the library from inside.
The agent drives login. When OpenCode hits a missing credential it can run
authsome login <provider> itself, opening a browser on your machine for OAuth consent. Don’t paste keys into prompts; pre-seed a credential only when an agent can’t reach a browser (CI, SSH).Recommended pattern: wrap the agent
OPENAI_API_KEY=authsome-proxy-managed) but never the real key. Outbound HTTPS to matched provider hosts is authenticated by the proxy.
Embedding the library
If you’re orchestrating OpenCode from a larger Python program and need explicit per-call control, drop below the proxy:Multi-account
--force. See Multiple connections per provider.
Troubleshooting
What’s next
Run agents with the proxy
Full proxy walkthrough.
Generic Python agent
The library pattern for any Python script.