codex-copilot-dx 1.2.19 → 1.2.21
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/README.md +3 -3
- package/bin/cli.mjs +9 -2
- package/docs/ARCHITECTURE.md +53 -0
- package/docs/REFERENCE.md +83 -13
- package/package.json +1 -1
- package/src/access-settings.mjs +1 -0
- package/src/api-catalog-refresh.mjs +72 -0
- package/src/client-model-plan.mjs +17 -7
- package/src/clients/codex-models.mjs +2 -2
- package/src/codex-api-config.mjs +94 -26
- package/src/codex-client-doctor.mjs +19 -5
- package/src/codex-config-doctor.mjs +6 -4
- package/src/config.mjs +8 -5
- package/src/connection-runtime.mjs +64 -57
- package/src/dashboard/connections.js +72 -31
- package/src/dashboard/console.js +2 -2
- package/src/dashboard/index.html +16 -16
- package/src/dashboard/language.js +9 -2
- package/src/dashboard/status.js +6 -4
- package/src/dashboard/tools.js +1 -1
- package/src/dashboard/ui.css +21 -1
- package/src/model-capabilities.mjs +8 -6
package/src/dashboard/console.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const el = id => document.getElementById(id);
|
|
3
3
|
const label = (node, key, values = {}) => globalThis.ccdxLanguage.set(node, key, values);
|
|
4
4
|
const titles = { overview: "overview", codex: "Codex", claude: "Claude", models: "model_services", usage: "usage_and_diagnostics", requests: "request_records", checks: "tools_checks_title", system: "system_and_settings" };
|
|
5
|
-
const settingsViews = ["codex", "models", "system", "checks"];
|
|
5
|
+
const settingsViews = ["codex", "claude", "models", "system", "checks"];
|
|
6
6
|
let current = "overview", settings = null, settingsPending = false, stopped = false, timer = null, ticks = 0;
|
|
7
7
|
let sourceDirty = false, reviewDirty = false, sourceModels = [], modelsPreference = null, sourceGeneration = 0, modelsSource = null;
|
|
8
8
|
let settingsReadAt = null;
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
settingsPending = true;
|
|
167
167
|
el("terminal-color-theme").disabled = true;
|
|
168
168
|
syncAccountControls();
|
|
169
|
-
try { applySettings(await api());settingsReadAt = time(Date.now()); }
|
|
169
|
+
try { applySettings(await api());settingsReadAt = time(Date.now());void globalThis.ccdxConnections?.load(); }
|
|
170
170
|
catch (error) {
|
|
171
171
|
for (const id of ["settings-note", ...(settingsViews.includes(current) ? ["page-settings-note"] : [])]) {
|
|
172
172
|
label(el(id), settingsReadAt ? "showing_previous_data_updated_time" : "could_not_read_settings", { time: settingsReadAt });
|
package/src/dashboard/index.html
CHANGED
|
@@ -64,16 +64,17 @@
|
|
|
64
64
|
<section class="panel dashboard-section"><h2 data-i18n="this_run_usage">THIS RUN</h2><p id="runtime-usage" class="table-note"></p><p class="table-note"><span data-i18n="approx_cache_hit_rate">Approx. cache hit rate</span>: <strong id="runtime-cache-hit" data-i18n-title="runtime_cache_hit_basis" title="Reused input / input tokens. ~ Partial counts. — Unknown or invalid.">—</strong></p><p class="hint" data-i18n="updated_from_returned_usage_not_a_live_bill_pending_usage_is_not">Counts returned usage only. Pending usage is not included. This is not a live bill.</p></section>
|
|
65
65
|
</div>
|
|
66
66
|
<div data-view="codex" hidden>
|
|
67
|
-
<div id="codex-model-management"> <section class="
|
|
68
|
-
<
|
|
67
|
+
<div id="codex-model-management"> <section class="connection-access" id="connection-clients">
|
|
68
|
+
<div id="connection-client-list"></div>
|
|
69
69
|
<details id="connection-disabled-clients" class="connection-disabled" hidden><summary data-i18n="api_disabled_clients">Disabled clients</summary><div id="connection-disabled-client-list"></div></details>
|
|
70
70
|
</section>
|
|
71
71
|
<section class="panel dashboard-section" id="connection-client-editor" hidden aria-labelledby="connection-client-title">
|
|
72
|
-
<div class="panel-heading"><h2 id="connection-client-title"></h2><
|
|
72
|
+
<div class="panel-heading"><h2 id="connection-client-title"></h2><span id="connection-draft-state" class="hint"></span></div>
|
|
73
73
|
<form id="connection-client-form">
|
|
74
|
-
<
|
|
74
|
+
<p id="connection-default-note" class="hint" role="status" hidden></p>
|
|
75
|
+
<div class="table-wrap"><table class="binding-table"><thead><tr><th data-i18n="model">Model</th><th data-i18n="source">Source</th><th data-i18n="cap_context">Context</th><th data-i18n="cap_reasoning">Reasoning</th><th data-i18n="cap_default">Default</th></tr></thead><tbody id="connection-bindings"></tbody></table></div>
|
|
75
76
|
<div class="setting-row"><label for="connection-auto-sync" data-i18n="cap_auto_sync">Sync model settings</label><input id="connection-auto-sync" type="checkbox" role="switch" checked><span class="hint" data-i18n="cap_sync_scope">Preserves your manual settings.</span></div>
|
|
76
|
-
<div class="section-actions"><button type="submit" data-i18n="api_save">Save</button><button type="button" id="connection-sync-preview" data-i18n="cap_sync_preview">Review sync</button></div>
|
|
77
|
+
<div class="section-actions"><button type="submit" data-i18n="api_save">Save</button><button type="button" id="connection-client-cancel" data-i18n="cap_discard_changes">Discard changes</button><button type="button" id="connection-sync-preview" data-i18n="cap_sync_preview">Review sync</button></div>
|
|
77
78
|
<p id="connection-client-note" class="hint" role="status" aria-live="polite"></p>
|
|
78
79
|
<div id="connection-sync-result" hidden></div>
|
|
79
80
|
</form>
|
|
@@ -144,25 +145,26 @@
|
|
|
144
145
|
<div data-view="claude" hidden>
|
|
145
146
|
<div class="provider-tabs client-segments" role="group" aria-label="Claude app"><button type="button" data-claude-client="claude_app" aria-pressed="true">Claude App</button><button type="button" data-claude-client="claude_code" aria-pressed="false">Claude Code</button></div>
|
|
146
147
|
<div id="claude-model-management"></div>
|
|
147
|
-
<
|
|
148
|
-
<
|
|
148
|
+
<details class="panel dashboard-section" id="claude-connections">
|
|
149
|
+
<summary data-i18n="connection_details">Connection details</summary>
|
|
149
150
|
<div class="table-wrap"><table><thead><tr><th data-i18n="client">APP</th><th data-i18n="connection_setup" data-i18n-title="configured_not_successful">Setup</th><th data-i18n="local_bridge">Local service</th><th data-i18n="last_request">LAST REQUEST</th></tr></thead><tbody id="claude-clients"></tbody></table></div>
|
|
150
151
|
<p id="claude-client-state" class="hint"></p>
|
|
151
152
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
<
|
|
155
|
-
<
|
|
153
|
+
<p id="claude-route" class="table-note"></p><p>Anthropic Messages</p><a class="section-link" href="#models" data-i18n="model_services">Model sources</a>
|
|
154
|
+
</details>
|
|
155
|
+
<details class="panel dashboard-section" id="claude-performance">
|
|
156
|
+
<summary data-i18n="request_performance">REQUEST PERFORMANCE</summary>
|
|
156
157
|
<dl class="stats"><div><dt data-i18n="completed">Completed</dt><dd id="claude-completed">—</dd></div><div><dt data-i18n="incomplete">Incomplete</dt><dd id="claude-incomplete">—</dd></div><div><dt data-i18n="failed">Failed</dt><dd id="claude-failed">—</dd></div><div><dt data-i18n="cancelled">Cancelled</dt><dd id="claude-cancelled">—</dd></div><div><dt data-i18n="first_output">First output</dt><dd id="claude-ttft">—</dd></div><div><dt data-i18n="output_speed">Output speed</dt><dd id="claude-speed">—</dd></div></dl>
|
|
157
158
|
|
|
158
159
|
|
|
159
160
|
<dl class="stats timing-stats"><div><dt data-i18n="estimated_percentiles" data-i18n-title="percentile_basis">Approx. first-output P50 / P95</dt><dd id="claude-ttft-percentiles">—</dd></div></dl>
|
|
160
161
|
<a class="section-link" href="#requests" data-i18n="view_request_details">View request details</a>
|
|
161
|
-
</
|
|
162
|
+
</details>
|
|
162
163
|
</div>
|
|
163
164
|
<div data-view="models" hidden>
|
|
164
165
|
<section class="panel dashboard-section" id="connection-sources">
|
|
165
166
|
<div class="panel-heading"><h2 data-i18n="model_services">Model sources</h2><button id="connection-add" type="button" data-i18n="api_add">Add API</button></div>
|
|
167
|
+
<div id="model-providers" class="provider-tabs" role="tablist" aria-label="Model providers" data-i18n-label="model_providers"></div>
|
|
166
168
|
<div id="connection-source-list"></div>
|
|
167
169
|
<details id="connection-disabled-sources" class="connection-disabled" hidden><summary data-i18n="api_disabled_sources">Disabled sources</summary><div id="connection-disabled-source-list"></div></details>
|
|
168
170
|
</section>
|
|
@@ -181,7 +183,7 @@
|
|
|
181
183
|
<label><span data-i18n="api_key_env">Read key from environment</span><input name="key_env" type="text" autocomplete="off" spellcheck="false" placeholder="CCDX_COMPANY_API_KEY"><span class="hint" data-i18n="api_key_env_hint">Optional for servers without a credential service. Set before starting CCDX.</span></label>
|
|
182
184
|
</div></details>
|
|
183
185
|
<fieldset><legend data-i18n="api_allowed_clients">Allowed clients</legend><div class="connection-checks" id="connection-allowed-clients"></div></fieldset>
|
|
184
|
-
<fieldset><legend data-i18n="model_catalog">Model list</legend><div class="section-actions"><button type="button" id="connection-discover" data-i18n="api_read_models">Read models</button><span class="hint" data-i18n="api_discovery_save_first">Save the API first. No chat request is sent.</span></div>
|
|
186
|
+
<fieldset><legend data-i18n="model_catalog">Model list</legend><div class="section-actions"><button type="button" id="connection-discover" data-i18n="api_read_models">Read models</button><button type="button" id="connection-discover-cancel" data-i18n="cancel" hidden>Cancel</button><span class="hint" data-i18n="api_discovery_save_first">Save the API first. No chat request is sent.</span></div>
|
|
185
187
|
<details class="tool-details" id="connection-manual-model"><summary data-i18n="api_manual_model">Add a model manually</summary><div class="section-actions"><input type="text" id="connection-model-id" spellcheck="false" autocomplete="off" aria-label="Model ID" placeholder="Model ID"><button type="button" id="connection-model-add" data-i18n="api_add_model">Add model</button></div></details>
|
|
186
188
|
<p class="hint" data-i18n="api_model_protocol_hint">Choose the APIs each model supports.</p><div class="table-wrap"><table><thead><tr><th data-i18n="model">Model</th><th data-i18n="api_protocols">Available APIs</th><th data-i18n="cap_context">Context</th><th data-i18n="cap_reasoning">Reasoning</th><th data-i18n="cap_search">Search</th><th></th></tr></thead><tbody id="connection-models"></tbody></table></div>
|
|
187
189
|
</fieldset>
|
|
@@ -193,8 +195,6 @@
|
|
|
193
195
|
<p id="connection-note" class="hint" role="status" aria-live="polite"></p>
|
|
194
196
|
|
|
195
197
|
|
|
196
|
-
<div id="model-providers" class="provider-tabs" role="tablist" aria-label="Model providers" data-i18n-label="model_providers"></div>
|
|
197
|
-
|
|
198
198
|
<div id="source-account-panel" role="tabpanel">
|
|
199
199
|
<p id="source-status-note" class="hint" role="status"></p>
|
|
200
200
|
<section class="panel dashboard-section" id="github-account">
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
<p id="m365-account-note" class="hint" role="status" aria-live="polite"></p>
|
|
232
232
|
</section>
|
|
233
233
|
<details class="panel dashboard-section model-catalog" id="upstream-models" open>
|
|
234
|
-
<summary class="panel-heading"><h2 data-i18n="model_catalog">MODEL LIST</h2><span id="models-state" data-i18n="checking_live">CHECKING</span></summary>
|
|
234
|
+
<summary class="panel-heading"><h2 data-i18n="model_catalog">MODEL LIST</h2><span id="models-state" role="status" aria-live="polite" data-i18n="checking_live">CHECKING</span></summary>
|
|
235
235
|
<div class="section-actions"><button id="refresh-models" type="button" data-i18n="refresh">Refresh</button></div>
|
|
236
236
|
<p id="models-note" class="table-note" data-i18n="reading_provider_catalog">Loading model list…</p>
|
|
237
237
|
<details id="model-check-details" class="model-check-details" hidden><summary data-i18n="source_check_details">Check details</summary><dl id="model-check-fields" class="failure-detail"></dl></details>
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
const translations = {
|
|
3
|
+
"api_saving": ["Saving…", "保存中…"],
|
|
4
|
+
"api_reading": ["Reading…", "读取中…"],
|
|
5
|
+
"api_read_cancelled": ["Read cancelled. Saved metadata is kept.", "已取消读取,保留已存资料。"],
|
|
6
|
+
"cap_unsaved": ["Unsaved changes", "尚未保存"],
|
|
7
|
+
"cap_saved": ["Saved", "已保存"],
|
|
8
|
+
"cap_default_unavailable": ["Default model unavailable. Choose a default before saving.", "默认模型暂不可用,请选择默认后保存。"],
|
|
9
|
+
"cap_limit_default_model_unavailable": ["Default model unavailable. Existing app settings were kept.", "默认模型暂不可用,保留应用设置。"],
|
|
3
10
|
"cap_discard_changes": ["Discard changes", "放弃修改"],
|
|
4
11
|
"cap_current_budget": ["Current budget", "当前预算"],
|
|
5
12
|
"cap_proposed_budget": ["After sync", "同步后预算"],
|
|
@@ -14,7 +21,7 @@
|
|
|
14
21
|
"cap_set_default": ["Set default", "设为默认"],
|
|
15
22
|
"cap_details": ["Details", "能力详情"],
|
|
16
23
|
"cap_app_access": ["App access", "应用接入"],
|
|
17
|
-
"cap_unknown": ["Not
|
|
24
|
+
"cap_unknown": ["Not provided", "未提供"],
|
|
18
25
|
"cap_supported": ["Supported", "支持"],
|
|
19
26
|
"cap_unsupported": ["Not supported", "不支持"],
|
|
20
27
|
"cap_auto_sync": ["Sync model settings", "同步模型设置"],
|
|
@@ -102,7 +109,7 @@
|
|
|
102
109
|
"api_client_disabled": ["CCDX access is off; the app stays open.", "接入已关闭,应用保持运行。"],
|
|
103
110
|
"api_close_client": ["Disable client access", "关闭客户端接入"],
|
|
104
111
|
"api_saved": ["Saved. Reopen the app for first-time setup; existing requests stay unchanged.", "已保存。首次接入请重新打开应用。"],
|
|
105
|
-
"api_config_saved": ["API saved.
|
|
112
|
+
"api_config_saved": ["API saved. Metadata refresh runs separately.", "API 已保存,模型资料另行刷新。"],
|
|
106
113
|
"api_provider_disabled": ["Source disabled. Its configuration was kept.", "来源已关闭,配置已保留。"],
|
|
107
114
|
"api_provider_enabled": ["Source enabled. Client selections are unchanged.", "来源已开启,客户端来源未改变。"],
|
|
108
115
|
"api_client_enabled": ["Client enabled. Choose a source to connect.", "客户端已开启,请选择来源。"],
|
package/src/dashboard/status.js
CHANGED
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
let contextSignature;
|
|
7
7
|
const sourceNames = new Map([["github", "GitHub Copilot"], ["m365", "Microsoft 365"]]);
|
|
8
8
|
|
|
9
|
+
const sourceLabel = id => globalThis.ccdxConnectionNames?.[id] || sourceNames.get(id) || id;
|
|
9
10
|
function renderProviders(data) {
|
|
10
11
|
const providers = data.providers || [];
|
|
11
12
|
const states = { saved: "saved_locally", authorized: "authorized", disabled: "disabled", unavailable: "unavailable_ca184",
|
|
12
13
|
unknown: "unknown", unconfigured: "not_configured", ready: "ready", checking: "checking", unsupported: "unsupported",
|
|
13
|
-
configured: "configured", preserved: "existing_settings_kept", partially_preserved: "existing_settings_kept",
|
|
14
|
+
configured: "configured", default_unavailable: "cap_default_unavailable", preserved: "existing_settings_kept", partially_preserved: "existing_settings_kept",
|
|
14
15
|
restored: "settings_restored", not_installed: "not_installed", configuration_unavailable: "setup_unavailable", not_configured: "unknown", standby: "standby" };
|
|
15
16
|
const auth = element("provider-auth"), clients = element("provider-clients"), requests = element("provider-requests"), claudeClients = element("claude-clients");
|
|
16
17
|
auth.replaceChildren();clients.replaceChildren();requests.replaceChildren();claudeClients?.replaceChildren();
|
|
@@ -129,7 +130,7 @@
|
|
|
129
130
|
const timeline = failure.timeline;
|
|
130
131
|
const provider = failure.provider || timeline?.provider;
|
|
131
132
|
if (provider) {
|
|
132
|
-
const source =
|
|
133
|
+
const source = sourceLabel(provider);
|
|
133
134
|
const original = phrase("detail_retry", summary);
|
|
134
135
|
localize(title, "source_failure_summary", { source, detail: original });
|
|
135
136
|
}
|
|
@@ -182,6 +183,7 @@
|
|
|
182
183
|
}
|
|
183
184
|
|
|
184
185
|
function render(data) {
|
|
186
|
+
for (const source of data.providers?.connections?.providers || []) sourceNames.set(source.id, source.name);
|
|
185
187
|
globalThis.ccdxDashboardActivity?.update(data.model_activity);
|
|
186
188
|
globalThis.ccdxDashboardFlow?.update(data);
|
|
187
189
|
text("version", `v${data.version || "?"}`);
|
|
@@ -233,7 +235,7 @@
|
|
|
233
235
|
const routes = { ...data.stream_performance?.by_route, ...claudeMetrics?.by_route };
|
|
234
236
|
for (const [protocol, route] of Object.entries(routes)) for (const [source, stats] of Object.entries(route.by_provider || {})) {
|
|
235
237
|
const totals = stats.terminal_outcomes.totals;
|
|
236
|
-
sourceBody.append(tableRow([
|
|
238
|
+
sourceBody.append(tableRow([sourceLabel(source), protocol, number(stats.active), ...["completed", "incomplete", "failed", "cancelled", "unknown"].map(outcome => number(totals[outcome]))]));
|
|
237
239
|
}
|
|
238
240
|
if (!sourceBody.children.length) emptyTable("source-requests-body", 8, "no_requests_observed");
|
|
239
241
|
}
|
|
@@ -300,7 +302,7 @@
|
|
|
300
302
|
? `${(100 * Number(context.input_tokens) / Number(context.context_window_tokens)).toFixed(1)}%` : "—";
|
|
301
303
|
const at = Date.parse(request.at);
|
|
302
304
|
const row = tableRow([Number.isFinite(at) ? time(at) : "—",
|
|
303
|
-
String(
|
|
305
|
+
String(sourceLabel(request.provider) || "—").slice(0, 80),
|
|
304
306
|
String(request.model || "unknown").slice(0, 80), outcome, number(context.input_tokens), ""], { labels: [3] });
|
|
305
307
|
const wireFailure = Number.isInteger(request.http_status) && request.http_status >= 400;
|
|
306
308
|
if (globalThis.ccdxIcons) globalThis.ccdxIcons.set(row.children[3], wireFailure ? "request_http_failure" : outcome.toLowerCase(),
|
package/src/dashboard/tools.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
function field(list, key, value, kind) {
|
|
17
17
|
const term = document.createElement("dt"), detail = document.createElement("dd");label(term, key);
|
|
18
18
|
if (kind) globalThis.ccdxIcons.set(detail, value, kind);else detail.textContent = value;
|
|
19
|
-
list.append(term, detail);
|
|
19
|
+
if (list.classList.contains("account-summary")) { const pair = document.createElement("div");pair.append(term, detail);list.append(pair); }else list.append(term, detail);
|
|
20
20
|
}
|
|
21
21
|
function syncSource() {
|
|
22
22
|
const github = selectedProvider === "github";
|
package/src/dashboard/ui.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
:root { color-scheme: dark; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; --page: #0b110d; --surface: #111a13; --text: #e0e9df; --strong: #f0f6ec; --muted: #9aada0; --badge: #a9b9aa; --subtle: #78917d; --quiet: #
|
|
1
|
+
:root { color-scheme: dark; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; --page: #0b110d; --surface: #111a13; --text: #e0e9df; --strong: #f0f6ec; --muted: #9aada0; --badge: #a9b9aa; --subtle: #78917d; --quiet: #819987; --footer: #7f9785; --border: #2b3b2f; --top-border: #2a3a2e; --accent: #a6f5a8; --accent-soft: #84e99e; --heading: #83b98b; --bad: #ff947e; --failed: #ff9f91; --incomplete: #e3c77c; --button-border: #45634b; --button-bg: #152219; --button-fg: #b2f1bd; --button-hover: #203526; --selected-bg: #192a1d; --option-hover: #1a2a1e; --table-text: #d8e2d8; --preview: #657d69; --ansi-white: #f5fff5; --ansi-159: #9af5e9; --ansi-123: #75e4d9; --ansi-87: #5ad0d4; --ansi-51: #42b9d8; --ansi-45: #3ca2d0; --ansi-39: #4389c2; --ansi-33: #4775b2; }
|
|
2
2
|
:root[data-theme="light"] { color-scheme: light; --page: #f5f8f3; --surface: #ffffff; --text: #1b2b20; --strong: #122219; --muted: #475d4e; --badge: #475d4e; --subtle: #4b6652; --quiet: #55715c; --footer: #59735f; --border: #c4d2c5; --top-border: #b8c9ba; --accent: #176b3a; --accent-soft: #176b3a; --heading: #235f37; --bad: #a33625; --failed: #a33625; --incomplete: #835600; --button-border: #79a085; --button-bg: #ebf4ec; --button-fg: #185b32; --button-hover: #dbeedd; --selected-bg: #e4f3e7; --option-hover: #edf6ee; --table-text: #233b2b; --preview: #596f60; --ansi-white: #234231; --ansi-159: #116b64; --ansi-123: #0d7771; --ansi-87: #116b75; --ansi-51: #14697e; --ansi-45: #1a6183; --ansi-39: #265f8d; --ansi-33: #365a8d; }
|
|
3
3
|
* { box-sizing: border-box; }
|
|
4
4
|
[hidden] { display: none !important; }
|
|
@@ -492,3 +492,23 @@ input[role="switch"]:disabled { opacity: .5; cursor: wait; }
|
|
|
492
492
|
.binding-table td:last-child button { min-width: 102px; white-space: nowrap; }
|
|
493
493
|
#connection-sync-result { margin-top: 20px; }
|
|
494
494
|
#connection-sync-result tr:last-child td { border-bottom: 0; }
|
|
495
|
+
|
|
496
|
+
.connection-access { margin: 0 0 12px; }
|
|
497
|
+
.connection-access .connection-row { padding: 0; min-height: 44px; }
|
|
498
|
+
#connection-sources .provider-tabs { margin: 18px 0 0; }
|
|
499
|
+
.binding-unavailable { display: block; margin-left: 22px; }
|
|
500
|
+
#connection-default-note { color: var(--incomplete); }
|
|
501
|
+
@media (max-width: 650px) {
|
|
502
|
+
.binding-table, .binding-table tbody { display: block; width: 100%; }
|
|
503
|
+
.binding-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
|
|
504
|
+
.binding-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
|
|
505
|
+
.binding-table tr:last-child { border-bottom: 0; }
|
|
506
|
+
.binding-table td { border: 0; padding: 0; min-width: 0; }
|
|
507
|
+
.binding-table td:first-child { grid-column: 1; min-width: 0; }
|
|
508
|
+
.binding-table td:first-child label { overflow-wrap: anywhere; }
|
|
509
|
+
.binding-table td[data-label] { grid-column: 1 / -1; color: var(--muted); }
|
|
510
|
+
.binding-table td[data-label]::before { content: attr(data-label) " · "; color: var(--subtle); }
|
|
511
|
+
.binding-table td:last-child { grid-column: 2; grid-row: 1; align-self: center; }
|
|
512
|
+
.binding-table td:last-child button { min-width: 88px; padding: 9px; }
|
|
513
|
+
.binding-table td[colspan] { grid-column: 1 / -1; }
|
|
514
|
+
}
|
|
@@ -38,9 +38,9 @@ export function catalogCapabilities(model) {
|
|
|
38
38
|
max_output_tokens: first(model.max_output_tokens, window.max_output_tokens),
|
|
39
39
|
reasoning: first(typeof caps.reasoning === "boolean" ? caps.reasoning : undefined, supports.reasoning),
|
|
40
40
|
reasoning_efforts: first(model.reasoning_efforts, supports.reasoning_effort),
|
|
41
|
-
input_modalities: first(model.input_modalities, caps.input_modalities),
|
|
42
|
-
tools: supports.tools, parallel_tools: supports.parallel_tool_calls, streaming: supports.streaming,
|
|
43
|
-
structured_output: supports.structured_output, web_search: first(model.web_search, caps.web_search), thinking_modes: first(model.thinking_modes, caps.thinking_modes),
|
|
41
|
+
input_modalities: first(model.input_modalities, caps.input_modalities, supports.vision === true ? ["text", "image"] : undefined),
|
|
42
|
+
tools: first(supports.tools, supports.tool_calls), parallel_tools: supports.parallel_tool_calls, streaming: supports.streaming,
|
|
43
|
+
structured_output: first(supports.structured_output, supports.structured_outputs), web_search: first(model.web_search, caps.web_search), thinking_modes: first(model.thinking_modes, caps.thinking_modes),
|
|
44
44
|
...Object.fromEntries(["reasoning_required", "reasoning_adaptive", "reasoning_budget_min", "reasoning_budget_max", "reasoning_format"].map(key => [key, first(model[key], caps[key])])),
|
|
45
45
|
};
|
|
46
46
|
for (const [key, value] of Object.entries(candidate)) if (value !== undefined && validCapabilities({ [key]: value })) values[key] = value;
|
|
@@ -54,9 +54,11 @@ export function resolveModelCapabilities(model, { revision, checkedAt = null, bu
|
|
|
54
54
|
const fields = {}, declared = builtin ? catalogCapabilities(model) : { ...metadata?.values, ...metadata?.protocols?.[protocol] };
|
|
55
55
|
const put = (values, source, time) => { for (const [key, value] of Object.entries(values || {})) fields[key] = { value, source, checked_at: time }; };
|
|
56
56
|
put(declared, "catalog", builtin ? checkedAt : model.metadata?.checked_at || null);
|
|
57
|
-
|
|
58
|
-
...(model.
|
|
59
|
-
|
|
57
|
+
if (!builtin) {
|
|
58
|
+
put({ ...(model.context_window === undefined ? {} : { context_window: model.context_window }),
|
|
59
|
+
...(model.reasoning_efforts === undefined ? {} : { reasoning_efforts: model.reasoning_efforts }) }, "manual", null);
|
|
60
|
+
put(Object.fromEntries(Object.entries(model.capabilities || {}).filter(([key, value]) => validCapabilities({ [key]: value }))), "manual", null);
|
|
61
|
+
}
|
|
60
62
|
const values = Object.fromEntries(Object.entries(fields).map(([key, field]) => [key, field.value]));
|
|
61
63
|
if (protocol && values.reasoning_format && values.reasoning_format !== protocol) {
|
|
62
64
|
for (const key of ["reasoning", "reasoning_efforts", "reasoning_required", "reasoning_adaptive", "reasoning_budget_min", "reasoning_budget_max", "reasoning_format", "thinking_modes"]) delete values[key];
|