openkodo 0.3.1 → 0.3.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this package. Versioned independently of OpenKodo.
4
4
 
5
+ ## 0.3.2
6
+
7
+ - Fix the model card showing 200k/250k context for every model. `limit.input`
8
+ now mirrors the live catalog's real context window instead of being capped
9
+ at 200k for early compaction.
10
+
5
11
  ## 0.3.1
6
12
 
7
13
  - Render the 5-hour, 7-day and monthly windows as **plan credits**, not USD.
package/README.md CHANGED
@@ -11,8 +11,8 @@ Provider id: `openkodo`.
11
11
  **monthly** pool — each with the amount used, the cap, and when it frees up.
12
12
  These are **plan credits**, not dollars.
13
13
  - The per-model 5-hour request guardrail
14
- - Early compaction: `limit.input` is 200k even for 1M-context models, so an
15
- agent compacts before a single prompt eats a large share of the 5h cap
14
+ - The real model context window is passed through in both `limit.context` and
15
+ `limit.input`; there is no artificial 200k cap
16
16
  - Thinking levels for every model that declares them, taken from the
17
17
  authenticated `GET /v1/models` descriptor
18
18
  - The live catalog from [`/api/public/models`](https://api.openkodo.dev/api/public/models)
package/index.mjs CHANGED
@@ -14,11 +14,6 @@ const USAGE = "https://api.openkodo.dev/api/plugin/usage"
14
14
  // when the oldest spend in the window falls out — not a fixed midnight.
15
15
  const FIVE_HOURS = 5 * 60 * 60_000
16
16
  const SEVEN_DAYS = 7 * 24 * 60 * 60_000
17
- // Agent hosts compact when the input reaches limit.input. A 1M-context model
18
- // with no input limit lets an agent grow the prompt far beyond a typical turn.
19
- // 200k keeps long-context capability but compacts early enough to stay economical.
20
- const COMPACT_AT = 200_000
21
-
22
17
  // Offline fallback only. The live model catalogs are authoritative;
23
18
  // these are the official standard (off-peak) USD list rates.
24
19
  const FALLBACK = {
@@ -53,7 +48,7 @@ const modelRecord = ({ name, context, output, input, outputPrice, cache, efforts
53
48
  const ctx = context || 1_000_000
54
49
  return {
55
50
  name,
56
- limit: { context: ctx, input: Math.min(ctx, COMPACT_AT), output: output || 131_072 },
51
+ limit: { context: ctx, input: ctx, output: output || 131_072 },
57
52
  cost: { input, output: outputPrice, cache: { read: cache } },
58
53
  tool_call: true,
59
54
  attachment: inputModalities.includes("image"),
@@ -133,12 +128,11 @@ async function fetchModels(key, signal) {
133
128
  const context = m.context_length ?? m.limit?.context ?? m.context_window ?? 1_000_000
134
129
  const output = m.max_completion_tokens ?? m.max_output_tokens ?? m.limit?.output ?? m.max_output ?? 131_072
135
130
  const inputModalities = modalitiesOf(m)
136
- const inputLimit = Math.min(context, COMPACT_AT)
137
131
  out[id] = {
138
132
  name: m.name || id,
139
133
  context,
140
134
  output,
141
- limit: { context, input: inputLimit, output },
135
+ limit: { context, input: context, output },
142
136
  // Config readers use the top-level flag. Model hooks use capabilities.
143
137
  reasoning,
144
138
  capabilities: {
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "icon": "https://openkodo.dev/openkodo-logo.svg"
10
10
  },
11
- "version": "0.3.1",
11
+ "version": "0.3.2",
12
12
  "description": "OpenKodo Magpie plugin: plans, credits, usage windows, and models in Magpie and OpenCode",
13
13
  "type": "module",
14
14
  "main": "./v1.mjs",