Repository navigation
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Add EVREN LLM, the Türkiye-based SSYZ/EVREN service, to the existing /connect integration picker. Users should be able to choose EVREN, supply an API key, and select a supported model without maintaining a custom provider definition.
This requests an entry in the existing /connect flow, rather than a new slash command. Please confirm the appropriate design before an implementation PR: the preferred starting point is models.dev, with an OpenCode provider plugin only if EVREN-specific behavior actually needs one.
Desired user flow
- Run
/connectand find EVREN LLM. - Enter an API key, or configure the proposed
EVREN_LLM_API_KEYenvironment variable. - Complete EVREN's terms prerequisite through its official interface/documented API, when required.
- Select an available, supported EVREN chat model and use it for streamed responses and agent tool calls.
- Receive a useful error if the key is invalid, terms are outstanding, or the service is unavailable.
Saving a credential must not be presented as proof that EVREN has accepted an inference request.
Verified findings
Checked on 2026-11-10, against OpenCode dev at f7a0684bee.
provider.connectalready opensDialogIntegration; integrations come from the server's Location-scoped inventory. See command registration and integration picker.ModelsDevPluginalready registers a provider's integration, key method, and environment method when its catalog entry declares environment variables. Absence from models.dev does not by itself require a new core plugin. The contribution guide explicitly asks for models.dev first.- No EVREN entry was found in the inspected bundled snapshot, provider registry, or models.dev source. At models.dev
dededf2efc,providers/evrenwas absent. Direct live catalog requests returned HTTP 403 from the research environment, so live catalog absence is not independently asserted. - Searches of open and closed issues/PRs in
anomalyco/opencodeforEVREN,evren-llmapi, andssyz.org.trfound no matches; EVREN issue/PR searches in models.dev also found no matches. This is a dated search result, not a guarantee against unindexed references.
Official API evidence, current public models, and limits of verification
Primary sources
- EVREN model/API documentation
- EVREN Swagger UI
- EVREN OpenAPI 3.1 schema, reporting
EVREN LLM APIversion0.1.0 - Official public model/status data used by the portal
Connection and authentication
- Proposed OpenAI-compatible base URL:
https://evren-llmapi.ssyz.org.tr/v1. - Official documentation shows
evren_llm_...keys and bothAuthorization: Bearer …andX-API-Keyexamples. - An unauthenticated
GET /v1/modelsreturned401, witherror.code = "unauthorized". - Credentialed reads using each header reached the terms gate and returned
403, witherror.code = "terms_not_accepted". - Credentialed
GET /v1/terms/statusandGET /v1/terms/textsucceeded with Bearer authentication. - The OpenAPI document does not declare
securitySchemes; it is useful for payloads but insufficient by itself to establish authentication behavior.
Terms are a model-discovery prerequisite too
The observed 403 terms_not_accepted came from GET /v1/models, before any inference attempt. A discovery plugin that turns every failure into an empty model list would hide a required onboarding step.
The documented flow is:
GET /v1/terms/status→ current version and acceptance state.GET /v1/terms/text→ version and Markdown content.- After explicit user review/consent,
POST /v1/terms/acceptwith{"version": <reviewed-current-version>}.
No acceptance request was made during this research. An MVP can keep acceptance external, but must document the actual official path and preserve useful terms errors. In-app terms review/acceptance can be a separate design; never accept terms silently.
Models observed in the official public data
| Model ID | EVREN task | Published context tokens |
|---|---|---|
glm-5.3 |
chat |
524,288 |
deepseek-v4.1-flash |
chat |
1,048,576 |
qwen3.8-flash-next |
chat |
262,144 |
gemma-4-31b |
chat |
262,144 |
qwen3-vl-30b |
vision_chat |
262,144 |
auto |
chat |
32,768 |
This is a dated public catalog, not proof that every API key can use every row. deepseek-v4-flash and mimo-v2.6-pro, mentioned in an earlier candidate list, were absent from this response. Do not hard-code that candidate list as current availability.
The public data also contains embedding, rerank, OCR, transcription, TTS, guard, and decision entries; those are outside this chat-provider request. Some chat entries advertise image input, so task === "vision_chat" alone is insufficient to determine vision support. Public portal and authenticated API capability field names also differ.
Authenticated model contract
OpenAPI's ModelListResponse contains data: ModelInfo[]. ModelInfo includes task, modalities, nullable context_length, nullable default_max_output_tokens, nullable capabilities, and nullable pricing.
default_max_output_tokensis an omitted-request default, not a documented hard maximum. Resolve its relationship to OpenCode's required output limit before mapping it.ModelCapabilitiesdescribes tool calling, vision, thinking, reasoning effort, accepted effort values/aliases, and other accepted parameters. Unsupported parameters can be rejected with 400; avoid inferring support solely from model names.autois a routing option. Its public capabilities are empty; do not copy a concrete model's tool/vision support or context window onto it without verification.- Pricing uses EVREN credits (
CRby default), whereas OpenCode model costs use USD per million tokens. Do not copy credit prices into USD fields or infer permanent free usage from dated examples.
Still unverified: successful authenticated model enumeration after acceptance, streaming inference, tool-call/result continuation, reasoning transport, image input, and actual account-specific availability. No inference request was made, and no end-to-end OpenCode compatibility is claimed yet.
Proposed implementation sequence and validation
1. Add catalog support first
Follow models.dev's provider contribution format. Proposed provider identity/configuration:
name = "EVREN LLM"
npm = "@ai-sdk/openai-compatible"
opencodeai = "@opencode/ai/providers/openai-compatible"
api = "https://evren-llmapi.ssyz.org.tr/v1"
env = ["EVREN_LLM_API_KEY"]
doc = "https://evren.ssyz.org.tr/llm/models"These environment-variable and display-name choices are proposals, not server requirements. Add properly sourced model definitions and the logo required by models.dev. Verify gateway-specific capabilities, reasoning compatibility, limits, and pricing representation; do not inherit unsupported underlying-model features.
Confirm the published entry reaches OpenCode's catalog and bundled/release path. The current catalog loader uses models.opencode.ai and a bundled snapshot.
2. Decide whether EVREN needs additional OpenCode code
A catalog entry may be enough for /connect. Assess the concrete remaining gaps: account-filtered discovery, terms guidance, or request compatibility that cannot be described by catalog metadata.
If justified, add packages/core/src/plugin/provider/evren.ts and register it in packages/core/src/plugin/provider.ts. Extend the catalog registration rather than creating competing provider/integration definitions. Use provider/integration ID evren and the existing OpenAI-compatible package; explicitly associate the provider with its integration if creating it independently.
For dynamic discovery, follow Modal, ProviderRefresh, and SharedCache:
- Fetch
GET /modelsrelative to the/v1base URL using the active connection. - Decode unknown JSON at the HTTP boundary; normalize
chat/vision_chatentries into chat models with explicit capabilities. - Scope cached results to endpoint and active credential identity/fingerprint; preserve connection provenance so one account's model list cannot become another account's.
- Reuse background refresh, bounded requests, deduplication, and transient-error handling. Do not retry terms/auth failures as transient failures.
- Keep startup and server handlers nonblocking; use existing provider/model update events for client refresh. Do not add server-side waits for plugin activation.
No INTEGRATION_PRIORITY.evren = 6 change is required for discoverability: the picker already includes and alphabetically sorts unprioritized integrations. Adding priority also promotes it into “Popular”, which is a separate product decision.
3. Validate the selected design
- Read the relevant
.opencode/skillstesting instructions first. Exercise production registry/credential/model code with fixture-driven tests and local HTTP fixtures where needed. - For a plugin implementation, add focused coverage such as
packages/core/test/plugin/provider-evren.test.ts: registration before credentials, stored key and env access, task/capability mapping, null/missing metadata, credential switching, refresh, and terms/auth/transient discovery failures. - Run focused tests and
bun typecheckfrompackages/core; include TUI tests/typechecks if TUI behavior changes. Run rootbun run checkfor the OpenCode change. A catalog-only contribution follows models.dev's validation workflow. - After externally accepted terms, perform a credentialed smoke test: list allowed models, stream a small reply, complete a tool-call/result round trip, and test advertised reasoning/vision support before claiming it.
- Verify the real
/connect → EVREN LLM → model pickerflow usingbun run dev:livefrom a development worktree. - Keep a future PR based on/targeted at
dev; obtain design approval before opening the implementation PR. If OpenCode code adds new behavior, apply the repository's feature-flag policy and document the flag. Include the required PR visual when applicable.
No Protocol/Server HttpApi changes are expected for catalog/provider registration. If the approved terms UX changes public contracts, regenerate the client with bun run generate from packages/client; do not edit generated files manually.
Acceptance criteria
- EVREN LLM appears in the existing
/connectpicker without custom provider JSON. - Stored API-key and documented environment-variable connections work through existing credential handling.
- A valid, terms-accepted connection exposes supported EVREN chat models; availability and metadata follow the chosen catalog/discovery design.
- At least one advertised tool-capable model completes streaming and an agent tool-call/result round trip.
- Model capabilities and context/output policies are grounded in verified EVREN behavior;
autois enabled only with verified capabilities. - Missing terms, invalid credentials, and discovery/inference failures remain distinguishable and actionable; terms are never accepted automatically.
- Existing providers and user overrides continue to work; no raw credentials enter logs, cache keys, tests, or issue attachments.
- The models.dev-first approach and any necessary OpenCode-specific exception receive maintainer design agreement.
Activity
opencodejr commentedon Nov 9, 2026
Thanks for the detailed write-up, @cemililik!
You're asking for EVREN LLM (SSYZ) to appear in
/connect, so users can enter an API key and pick an EVREN chat model without writing their own provider definition.You already found the preferred route. The contribution guide asks for new providers to be added to models.dev first. A models.dev entry that declares an environment variable is normally enough for the provider to show up in
/connectwith key and env-var setup. Extra OpenCode code (for example, per-account model discovery or clearerterms_not_acceptederrors) would be a separate decision for maintainers, based on what the catalog entry can't express.Until then, EVREN's API is OpenAI-compatible, so you can use it now by defining it as a custom provider (
@ai-sdk/openai-compatiblewith base URLhttps://evren-llmapi.ssyz.org.tr/v1) in your config.I didn't find any existing issues or PRs about EVREN. Maintainers will consider the request and the design question you raised.