one-model-router 0.0.10 → 0.0.12
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/LICENSE +21 -21
- package/README.md +32 -5
- package/bin/omr.js +46 -0
- package/package.json +3 -2
- package/src/admin.js +965 -941
- package/src/balances.js +61 -61
- package/src/boot.js +117 -117
- package/src/channels/buddy.js +2031 -2031
- package/src/channels/cline.js +753 -753
- package/src/channels/codearts.js +2051 -2051
- package/src/channels/comate.js +830 -830
- package/src/channels/doubaowork.js +1784 -1784
- package/src/channels/freebuff.js +1316 -1316
- package/src/channels/gemini.js +1721 -1721
- package/src/channels/index.js +270 -270
- package/src/channels/joycode.js +936 -936
- package/src/channels/kimi.js +572 -572
- package/src/channels/lobsterai.js +1226 -1226
- package/src/channels/loomy.js +1032 -1032
- package/src/channels/miaoshou.js +1396 -1396
- package/src/channels/mimo.js +474 -474
- package/src/channels/minimax.js +1451 -1451
- package/src/channels/qoder-wasm.js +434 -434
- package/src/channels/qoder.js +1619 -1619
- package/src/channels/raccoon.js +1842 -1842
- package/src/channels/tabbit.js +1457 -1457
- package/src/channels/trae.js +1405 -1405
- package/src/channels/zcode-global.js +35 -35
- package/src/channels/zcode.js +2085 -2085
- package/src/checkin.js +496 -496
- package/src/credits.js +464 -464
- package/src/crypto.js +132 -132
- package/src/free-models.js +683 -683
- package/src/gateway.js +596 -578
- package/src/health.js +86 -86
- package/src/model-key.js +35 -35
- package/src/paths.js +96 -96
- package/src/probe.js +318 -318
- package/src/providers/builtin.js +626 -626
- package/src/providers/index.js +483 -457
- package/src/providers/kilo.js +111 -111
- package/src/providers/last-good.js +69 -69
- package/src/providers/modelsdev.js +242 -242
- package/src/providers/openai-compat.js +312 -312
- package/src/providers/opencode/bun-fetch.js +226 -226
- package/src/providers/opencode/lane.js +186 -186
- package/src/providers/opencode/o2a/LICENSE.dsh-our-free-model +21 -21
- package/src/providers/opencode/o2a/asset-source.js +43 -43
- package/src/providers/opencode/o2a/assets/opencode_prompt_v2.txt +96 -96
- package/src/providers/opencode/o2a/assets/opencode_tools.json +327 -327
- package/src/providers/opencode/o2a/entry.js +17 -17
- package/src/providers/opencode/o2a/gateway-body.js +42 -42
- package/src/providers/opencode/o2a/headers.js +133 -133
- package/src/providers/opencode/o2a/identity.js +148 -148
- package/src/providers/opencode/o2a/official-prompt.js +191 -191
- package/src/providers/opencode/o2a/official-tools.js +110 -110
- package/src/providers/opencode/o2a/tool-renames.js +217 -217
- package/src/providers/opencode/o2a/toolshape.js +418 -418
- package/src/providers/opencode/o2a/version.js +37 -37
- package/src/providers/opencode/upstream.js +403 -403
- package/src/providers/opencode/wire.js +496 -496
- package/src/providers/opencode.js +652 -652
- package/src/router.js +629 -629
- package/src/server.js +49 -33
- package/src/store.js +467 -467
- package/src/sync/index.js +1529 -1529
- package/src/sync/login-preload.cjs +52 -52
- package/src/sync/noise.js +141 -141
- package/src/sync/relay-http.js +176 -176
- package/src/sync/remote-host.js +818 -818
- package/src/sync/remote-http.js +112 -112
- package/src/sync/remote-login.js +657 -657
- package/src/sync/remote-pairing.js +204 -204
- package/src/sync/remote-protocol.js +321 -321
- package/src/sync/snapshot.js +211 -211
- package/src/update.js +458 -0
- package/src/util.js +334 -334
- package/web/app.js +4010 -3972
- package/web/index.html +32 -32
- package/web/style.css +971 -971
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Version pins for this directory, in one place.
|
|
3
|
-
*
|
|
4
|
-
* When the target service changes its release, bump the constants below
|
|
5
|
-
* together with the diff you apply, so a stale implementation can never hide
|
|
6
|
-
* behind a current assets file. The embedded assets in `assets/` are captured
|
|
7
|
-
* verbatim from the official client and must never be edited here.
|
|
8
|
-
*
|
|
9
|
-
* @module src/o2a/version.js
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/** The gateway release this implementation targets. */
|
|
13
|
-
export const O2A_VERSION = '1.4.7'
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* The OpenCode 2.x CLI version this lane impersonates.
|
|
17
|
-
* The v2 gate fingerprints `opencode/latest/<version>/cli`; the pin is kept
|
|
18
|
-
* current with the official client.
|
|
19
|
-
*
|
|
20
|
-
* 2.2.3 was captured live from the official client on 2026-10-30 (via an
|
|
21
|
-
* HTTP-Toolkit trace): the 2.1.1 spelling pinned before then is an
|
|
22
|
-
* older client than the one the gate now sees most often, and the same trace
|
|
23
|
-
* shows the client carrying `traceparent`/`b3` — see `headers.js`.
|
|
24
|
-
*/
|
|
25
|
-
export const V2_CLIENT_VERSION = '2.2.3'
|
|
26
|
-
|
|
27
|
-
/** The v2 User-Agent. Must be sent alone, unmodified. */
|
|
28
|
-
export const CLIENT_UA = `opencode/latest/${V2_CLIENT_VERSION}/cli`
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* The `max_completion_tokens` a 2.x client puts on every chat body,
|
|
32
|
-
* added when the caller named no ceiling.
|
|
33
|
-
*/
|
|
34
|
-
export const V2_COMPLETION_LIMIT = 32000
|
|
35
|
-
|
|
36
|
-
/** The keyless anonymous credential: literal "public". */
|
|
37
|
-
export const ANONYMOUS_CREDENTIAL = 'public'
|
|
1
|
+
/**
|
|
2
|
+
* Version pins for this directory, in one place.
|
|
3
|
+
*
|
|
4
|
+
* When the target service changes its release, bump the constants below
|
|
5
|
+
* together with the diff you apply, so a stale implementation can never hide
|
|
6
|
+
* behind a current assets file. The embedded assets in `assets/` are captured
|
|
7
|
+
* verbatim from the official client and must never be edited here.
|
|
8
|
+
*
|
|
9
|
+
* @module src/o2a/version.js
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** The gateway release this implementation targets. */
|
|
13
|
+
export const O2A_VERSION = '1.4.7'
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The OpenCode 2.x CLI version this lane impersonates.
|
|
17
|
+
* The v2 gate fingerprints `opencode/latest/<version>/cli`; the pin is kept
|
|
18
|
+
* current with the official client.
|
|
19
|
+
*
|
|
20
|
+
* 2.2.3 was captured live from the official client on 2026-10-30 (via an
|
|
21
|
+
* HTTP-Toolkit trace): the 2.1.1 spelling pinned before then is an
|
|
22
|
+
* older client than the one the gate now sees most often, and the same trace
|
|
23
|
+
* shows the client carrying `traceparent`/`b3` — see `headers.js`.
|
|
24
|
+
*/
|
|
25
|
+
export const V2_CLIENT_VERSION = '2.2.3'
|
|
26
|
+
|
|
27
|
+
/** The v2 User-Agent. Must be sent alone, unmodified. */
|
|
28
|
+
export const CLIENT_UA = `opencode/latest/${V2_CLIENT_VERSION}/cli`
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The `max_completion_tokens` a 2.x client puts on every chat body,
|
|
32
|
+
* added when the caller named no ceiling.
|
|
33
|
+
*/
|
|
34
|
+
export const V2_COMPLETION_LIMIT = 32000
|
|
35
|
+
|
|
36
|
+
/** The keyless anonymous credential: literal "public". */
|
|
37
|
+
export const ANONYMOUS_CREDENTIAL = 'public'
|