You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Plugins that need a small isolated model call currently have to use client.session.prompt(). That creates a session and runs the normal agent pipeline, adding base prompts, project instructions, tools and context. A plugin-safe raw generation API should reuse OpenCode's provider authentication and model configuration while sending only an explicit system prompt and user prompt.
Suggested contract:
awaitclient.experimental.generateText({query: { directory },body: {model: { providerID, modelID, variant },system: "You are a professional translator. Output only the translation.",prompt: "Translate this text...",temperature: 0,maxOutputTokens: 2048,},})
Requirements:
Reuse existing provider resolution, API keys, OAuth, endpoints, variants, retries and timeouts.
Exclude session history, agent prompts, project instructions, tools, skills, MCP context and plugin system transforms unless explicitly requested.
Do not create or persist sessions/messages.
Do not expose credential material to plugins.
Return generated text, usage and typed provider errors.
This would let translation and similar plugins make a minimal model request without requiring duplicate credentials or paying for unrelated OpenCode context.
The issue appears to be a feature request but does not use the feature request template. The title should start with [FEATURE]: and the issue body should include the verification checkbox confirming this hasn't been suggested before.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
If you believe this was flagged incorrectly, please let a maintainer know.
changed the title [-]Expose plugin-safe raw text generation using OpenCode provider auth[/-][+][FEATURE]: Plugin-safe raw text generation[/+]on Jul 28, 2026
Activity
github-actions commentedon Jul 28, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:and the issue body should include the verification checkbox confirming this hasn't been suggested before.Please edit this issue to address the above within 2 hours, or it will be automatically closed.
If you believe this was flagged incorrectly, please let a maintainer know.
[-]Expose plugin-safe raw text generation using OpenCode provider auth[/-][+][FEATURE]: Plugin-safe raw text generation[/+]github-actions commentedon Jul 28, 2026
Thanks for updating the issue! Everything looks good now. We appreciate the clear description and the well-thought-out API contract.
github-actions commentedon Sep 28, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.