@oneciel-ai/ciel-runtime 0.2.45 → 0.2.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ciel_runtime_support/providers/opencode.py +8 -0
- package/ciel_runtime_support/providers/opencode_catalog.py +111 -0
- package/ciel_runtime_support/providers/opencode_go.py +10 -1
- package/ciel_runtime_support/runtime_constants.py +1 -1
- package/docs/journal/2026/09/12/providers/opencode/catalog-update.okf +18 -0
- package/docs/journal/2026/09/12/releases/opencode/deployment.okf +7 -0
- package/package.json +1 -1
|
@@ -20,6 +20,7 @@ from .base import (
|
|
|
20
20
|
provider_configuration,
|
|
21
21
|
)
|
|
22
22
|
from .constants import DEFAULT_REQUEST_TIMEOUT_MS, PROVIDER_DEFAULT_BASE_URLS
|
|
23
|
+
from .opencode_catalog import OPENCODE_ZEN_MODEL_PROTOCOLS
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
OPENCODE_ZEN_OX_ALPHA_FREE_MODEL = "x-preview-f-free"
|
|
@@ -36,6 +37,7 @@ class OpenCodeProviderAdapter(HttpBearerProviderAdapter):
|
|
|
36
37
|
custom_models=(
|
|
37
38
|
"claude-sonnet-4-6",
|
|
38
39
|
OPENCODE_ZEN_OX_ALPHA_FREE_MODEL,
|
|
40
|
+
*(model for model in OPENCODE_ZEN_MODEL_PROTOCOLS if model != "claude-sonnet-4-6"),
|
|
39
41
|
),
|
|
40
42
|
native_compat=True,
|
|
41
43
|
context_window=200000,
|
|
@@ -138,6 +140,9 @@ class OpenCodeProviderAdapter(HttpBearerProviderAdapter):
|
|
|
138
140
|
if normalized.startswith(prefix):
|
|
139
141
|
normalized = normalized[len(prefix) :]
|
|
140
142
|
break
|
|
143
|
+
documented = self.documented_model_protocols().get(normalized)
|
|
144
|
+
if documented is not None:
|
|
145
|
+
return documented
|
|
141
146
|
if self.name == "opencode-go":
|
|
142
147
|
if normalized.startswith(("gpt-", "grok-", "muse-spark-")):
|
|
143
148
|
return "openai_responses"
|
|
@@ -171,6 +176,9 @@ class OpenCodeProviderAdapter(HttpBearerProviderAdapter):
|
|
|
171
176
|
return "openai_chat"
|
|
172
177
|
return "anthropic_messages"
|
|
173
178
|
|
|
179
|
+
def documented_model_protocols(self) -> Mapping[str, MessageProtocol]:
|
|
180
|
+
return OPENCODE_ZEN_MODEL_PROTOCOLS
|
|
181
|
+
|
|
174
182
|
def supported_protocols(
|
|
175
183
|
self, config: ProviderConfig, model: str | None = None
|
|
176
184
|
) -> frozenset[MessageProtocol]:
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"""Official OpenCode endpoint snapshot (2026-09-12).
|
|
2
|
+
|
|
3
|
+
Sources: https://opencode.ai/docs/zen/ and https://opencode.ai/docs/go/.
|
|
4
|
+
Live model discovery remains authoritative for availability; this snapshot
|
|
5
|
+
provides offline choices and exact per-plan protocol routing. No model capacity
|
|
6
|
+
or sampling parameters are inferred from model names.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
OPENCODE_ZEN_MODEL_PROTOCOLS = {
|
|
10
|
+
"gpt-6-astra": "openai_responses",
|
|
11
|
+
"gpt-5.6-sol": "openai_responses",
|
|
12
|
+
"gpt-5.6-terra": "openai_responses",
|
|
13
|
+
"gpt-5.6-luna": "openai_responses",
|
|
14
|
+
"gpt-5.5": "openai_responses",
|
|
15
|
+
"gpt-5.5-pro": "openai_responses",
|
|
16
|
+
"gpt-5.4": "openai_responses",
|
|
17
|
+
"gpt-5.4-pro": "openai_responses",
|
|
18
|
+
"gpt-5.4-mini": "openai_responses",
|
|
19
|
+
"gpt-5.4-nano": "openai_responses",
|
|
20
|
+
"gpt-5.3-codex": "openai_responses",
|
|
21
|
+
"gpt-5.3-codex-spark": "openai_responses",
|
|
22
|
+
"gpt-5.2": "openai_responses",
|
|
23
|
+
"gpt-5.2-codex": "openai_responses",
|
|
24
|
+
"gpt-5.1": "openai_responses",
|
|
25
|
+
"gpt-5.1-codex": "openai_responses",
|
|
26
|
+
"gpt-5.1-codex-max": "openai_responses",
|
|
27
|
+
"gpt-5.1-codex-mini": "openai_responses",
|
|
28
|
+
"gpt-5": "openai_responses",
|
|
29
|
+
"gpt-5-codex": "openai_responses",
|
|
30
|
+
"gpt-5-nano": "openai_responses",
|
|
31
|
+
"claude-fable-5-1": "anthropic_messages",
|
|
32
|
+
"claude-fable-5": "anthropic_messages",
|
|
33
|
+
"claude-opus-5": "anthropic_messages",
|
|
34
|
+
"claude-opus-4-8": "anthropic_messages",
|
|
35
|
+
"claude-opus-4-7": "anthropic_messages",
|
|
36
|
+
"claude-opus-4-6": "anthropic_messages",
|
|
37
|
+
"claude-opus-4-5": "anthropic_messages",
|
|
38
|
+
"claude-sonnet-5": "anthropic_messages",
|
|
39
|
+
"claude-sonnet-4-6": "anthropic_messages",
|
|
40
|
+
"claude-sonnet-4-5": "anthropic_messages",
|
|
41
|
+
"claude-haiku-4-5": "anthropic_messages",
|
|
42
|
+
"gemini-3.8-flash": "google_generative",
|
|
43
|
+
"gemini-3.7-flash": "google_generative",
|
|
44
|
+
"gemini-3.6-flash": "google_generative",
|
|
45
|
+
"gemini-3.5-flash": "google_generative",
|
|
46
|
+
"gemini-3.5-flash-lite": "google_generative",
|
|
47
|
+
"gemini-3.1-pro": "google_generative",
|
|
48
|
+
"gemini-3-flash": "google_generative",
|
|
49
|
+
"grok-4.6": "openai_responses",
|
|
50
|
+
"grok-4.5": "openai_responses",
|
|
51
|
+
"grok-build-0.1": "openai_responses",
|
|
52
|
+
"muse-spark-1.3": "openai_responses",
|
|
53
|
+
"muse-spark-1.2": "openai_responses",
|
|
54
|
+
"qwen3.7-max": "anthropic_messages",
|
|
55
|
+
"qwen3.7-plus": "anthropic_messages",
|
|
56
|
+
"qwen3.6-plus": "anthropic_messages",
|
|
57
|
+
"qwen3.5-plus": "anthropic_messages",
|
|
58
|
+
"deepseek-v4-pro": "openai_chat",
|
|
59
|
+
"deepseek-v4-flash": "openai_chat",
|
|
60
|
+
"deepseek-v4-flash-vision-exp": "openai_chat",
|
|
61
|
+
"minimax-m3": "openai_chat",
|
|
62
|
+
"minimax-m2.7": "openai_chat",
|
|
63
|
+
"minimax-m2.5": "openai_chat",
|
|
64
|
+
"glm-5.3-flash": "openai_chat",
|
|
65
|
+
"glm-5.3": "openai_chat",
|
|
66
|
+
"glm-5.2": "openai_chat",
|
|
67
|
+
"glm-5.1": "openai_chat",
|
|
68
|
+
"glm-5": "openai_chat",
|
|
69
|
+
"kimi-k2.5": "openai_chat",
|
|
70
|
+
"kimi-k2.6": "openai_chat",
|
|
71
|
+
"kimi-k2.7-code": "openai_chat",
|
|
72
|
+
"kimi-k3": "openai_chat",
|
|
73
|
+
"big-pickle": "openai_chat",
|
|
74
|
+
"mimo-v2.5-free": "openai_chat",
|
|
75
|
+
"ling-3.0-flash-fin-free": "openai_chat",
|
|
76
|
+
"nemotron-3-ultra-free": "openai_chat",
|
|
77
|
+
"nemotron-3.5-lightning-free": "openai_chat",
|
|
78
|
+
"muse-spark-1.3-contributor-free": "openai_responses",
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
OPENCODE_GO_MODEL_PROTOCOLS = {
|
|
82
|
+
"grok-4.6": "openai_responses",
|
|
83
|
+
"gpt-5.6-luna": "openai_responses",
|
|
84
|
+
"glm-5.3-flash": "openai_chat",
|
|
85
|
+
"glm-5.3": "openai_chat",
|
|
86
|
+
"glm-5.2": "openai_chat",
|
|
87
|
+
"glm-5.1": "openai_chat",
|
|
88
|
+
"kimi-k3": "openai_chat",
|
|
89
|
+
"kimi-k2.7-code": "openai_chat",
|
|
90
|
+
"kimi-k2.6": "openai_chat",
|
|
91
|
+
"longcat-2.0": "openai_chat",
|
|
92
|
+
"deepseek-v4.1-flash": "openai_chat",
|
|
93
|
+
"deepseek-v4-pro": "openai_chat",
|
|
94
|
+
"deepseek-v4-flash": "openai_chat",
|
|
95
|
+
"deepseek-v4-flash-vision-exp": "openai_chat",
|
|
96
|
+
"mimo-v2.5": "openai_chat",
|
|
97
|
+
"mimo-v2.5-pro": "openai_chat",
|
|
98
|
+
"minimax-m3": "anthropic_messages",
|
|
99
|
+
"minimax-m2.7": "anthropic_messages",
|
|
100
|
+
"minimax-m2.5": "anthropic_messages",
|
|
101
|
+
"muse-spark-1.3-contributor": "openai_responses",
|
|
102
|
+
"muse-spark-1.2-contributor": "openai_responses",
|
|
103
|
+
"qwen3.8-max": "anthropic_messages",
|
|
104
|
+
"qwen3.8-flash": "anthropic_messages",
|
|
105
|
+
"qwen3.7-max": "anthropic_messages",
|
|
106
|
+
"qwen3.7-plus": "anthropic_messages",
|
|
107
|
+
"qwen3.6-plus": "anthropic_messages",
|
|
108
|
+
"hy4-preview": "openai_chat",
|
|
109
|
+
"hy3": "openai_chat",
|
|
110
|
+
}
|
|
111
|
+
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"""OpenCode Go provider adapter."""
|
|
2
2
|
|
|
3
3
|
from dataclasses import dataclass, field
|
|
4
|
+
from typing import Mapping
|
|
5
|
+
|
|
6
|
+
from ..architecture import MessageProtocol
|
|
4
7
|
|
|
5
8
|
from .base import provider_configuration
|
|
6
9
|
from .constants import DEFAULT_REQUEST_TIMEOUT_MS, PROVIDER_DEFAULT_BASE_URLS
|
|
7
10
|
from .opencode import OPENCODE_GO_OX_ALPHA_FREE_MODEL, OpenCodeProviderAdapter
|
|
11
|
+
from .opencode_catalog import OPENCODE_GO_MODEL_PROTOCOLS
|
|
8
12
|
|
|
9
13
|
|
|
10
14
|
@dataclass(frozen=True)
|
|
@@ -14,7 +18,8 @@ class OpenCodeGoProviderAdapter(OpenCodeProviderAdapter):
|
|
|
14
18
|
configuration_defaults_value: dict = field(
|
|
15
19
|
default_factory=lambda: provider_configuration(
|
|
16
20
|
"qwen3.6-plus",
|
|
17
|
-
custom_models=("qwen3.6-plus", OPENCODE_GO_OX_ALPHA_FREE_MODEL
|
|
21
|
+
custom_models=("qwen3.6-plus", OPENCODE_GO_OX_ALPHA_FREE_MODEL,
|
|
22
|
+
*(model for model in OPENCODE_GO_MODEL_PROTOCOLS if model != "qwen3.6-plus")),
|
|
18
23
|
native_compat=True,
|
|
19
24
|
context_window=1048576,
|
|
20
25
|
max_output_tokens=8192,
|
|
@@ -29,6 +34,10 @@ class OpenCodeGoProviderAdapter(OpenCodeProviderAdapter):
|
|
|
29
34
|
)
|
|
30
35
|
)
|
|
31
36
|
api_key_display_name_value: str = "OpenCode Go"
|
|
37
|
+
|
|
38
|
+
def documented_model_protocols(self) -> Mapping[str, MessageProtocol]:
|
|
39
|
+
return OPENCODE_GO_MODEL_PROTOCOLS
|
|
40
|
+
|
|
32
41
|
api_key_launch_error_value: str = (
|
|
33
42
|
"Launch blocked: OpenCode Go requires a OpenCode Go API key."
|
|
34
43
|
)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
okf_version: "1.0"
|
|
2
|
+
request: Check and add OpenCode Zen and Go models.
|
|
3
|
+
sources:
|
|
4
|
+
zen: https://opencode.ai/docs/zen/
|
|
5
|
+
go: https://opencode.ai/docs/go/
|
|
6
|
+
evidence:
|
|
7
|
+
official_endpoint_rows: Zen 69, Go 28, fetched live and parsed from official HTML tables.
|
|
8
|
+
models_api: Unauthenticated Zen models request returned HTTP 403; documentation used as fallback evidence, not a claim of account availability.
|
|
9
|
+
changes:
|
|
10
|
+
- Versioned provider-owned endpoint snapshot, with per-plan fallback model choices.
|
|
11
|
+
- Exact documented model protocol lookup before legacy family fallback; explicit user endpoint overrides still win.
|
|
12
|
+
- Correct longcat-2.0 and hy4-preview Go and ling-3.0-flash-fin-free Zen to chat/completions.
|
|
13
|
+
- Preserve MiniMax Zen chat versus Go messages distinction.
|
|
14
|
+
limits:
|
|
15
|
+
- No paid generation or live session changes performed.
|
|
16
|
+
- No fabricated context/output/sampling values; provider metadata discovery remains in use.
|
|
17
|
+
- Existing Responses/Gemini unsupported metadata flags were not changed; catalog presence is not proof of full inference support.
|
|
18
|
+
- No deployment or branch merge requested in this turn; changes remain on nightly working tree.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
okf_version: "1.0"
|
|
2
|
+
request: Merge OpenCode changes to main, deploy stable, create a new nightly branch and deploy nightly.
|
|
3
|
+
version: 0.2.46
|
|
4
|
+
scope: OpenCode Zen/Go documented model catalogs and protocol selection.
|
|
5
|
+
excluded: Unfinished Windows console guard and child-exit diagnostic working-tree changes.
|
|
6
|
+
verification: 57 OpenCode tests passed; live official endpoint tables matched 69 Zen and 28 Go models; no paid inference validation.
|
|
7
|
+
branch_policy: New work branch nightly-0.2.46; deployment tracking branch nightly retained because npm workflow is triggered only by main/nightly.
|
package/package.json
CHANGED