Repository navigation
Expand file tree
/
Copy pathcordis.patch.yml
More file actions
61 lines (60 loc) · 3.45 KB
/
Copy pathcordis.patch.yml
File metadata and controls
61 lines (60 loc) · 3.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# dsh-commandcode-goat — the loader row this bundle contributes.
#
# A patch file is a top-level YAML ARRAY of patch entries, and a patch replaces
# the targeted row's whole `config` (it does not deep-merge), so this bundle
# only ever *adds* its own row and never restates a shipped one. The row names
# this package rather than a source path, which is what lets Node resolve the
# installed code.
#
# The plugin hard-injects nothing: `settings`, `web`, `webServer`, `tools` and
# `credentials` are each attached through an optional ctx.inject, so the same
# row loads in a headless or SDK profile and simply does less there.
#
# Per-deployment facts belong here rather than in the settings card when they
# are secrets or fixed by the deployment. Anything omitted falls back to the
# schema defaults:
#
# config:
# plan: goat # go | goat | pro | max
# targetApiKeyEnv: COMMANDCODE_API_KEY
# # targetBaseURL: https://api.commandcode.ai/provider/v1
# # usageBaseURL: https://api.commandcode.ai
# # extraIds: [my/private-model]
# # autoSync: false # on by default: the routes are created on first load
# # pruneOtherPlans: false # on by default: a switch removes the other tier's routes
# # webSearch: true
# # recoverUpstreamOverflow: false # on by default: reduce + retry once the gateway refuses
# # contextGuardRatio: 0.7 # share of the route's window at which to prune before a request; 0 disables
# # maxContextWindow: 0 # 0 keeps the vendor's own window on every model
#
# `contextGuardRatio` is the one that keeps a long session alive. DSH compacts at
# min(0.8 x window, window - output reservation - 65536) — 800,000 tokens for a
# 1,000,000-token model — and Command Code's gateway stops completing requests
# right about there, so a session can sit one step short of that line and be
# refused on the request that would have crossed it. At the guard the plugin
# prunes oversized tool results through the harness' own pruner (no upstream
# call, conversation tail kept); summarization stays the harness' own decision at
# the harness' own threshold. Where the harness' line is already the earlier
# trigger (a window below ~218k tokens, or ~328k with the adapter's usual 32,768
# output reservation) the guard steps aside. Set 0 to leave everything to the
# harness' threshold.
#
# `recoverUpstreamOverflow` is what handles a gateway that refuses a request it
# cannot expand — the "path expansion / 512 candidates" 400 the harness reads as
# an ordinary invalid request, and therefore neither retries nor compacts for —
# and, for a session already past the guard, a request the gateway drops or
# stalls (TRANSPORT / TIMEOUT / EMPTY_RESPONSE / STREAM_CLOSED). With it on, this
# plugin prunes oversized tool results and asks for the request to be retried,
# and compacts one region on a second refusal, so the routes can keep publishing
# the window the vendor declares. Turn it off to let the upstream error stand as
# it is.
#
# `maxContextWindow` is the escape hatch, and it is not a fix: a vendor number
# the gateway cannot honour does not buy a longer conversation, it buys a
# rejected request once the conversation passes what the route really accepts.
# Lowering it makes the harness summarise earlier and permanently — the
# subscription's own window stops being usable at all — so it is only for a
# deployment whose gateway refuses even reduced requests.
- insert:
- id: commandcode-goat
name: dsh-commandcode-goat