@companion-ai/feynman 0.5.11 → 0.5.13
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/RELEASES.md
CHANGED
|
@@ -6,6 +6,15 @@ GitHub release notes are generated from the matching `## vX.Y.Z` section in this
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## v0.5.13 - 2026-09-28
|
|
10
|
+
|
|
11
|
+
- **OpenCode no longer recommends a retired Kimi model.** OpenCode Go and OpenCode Zen retired `kimi-k2.6` ("Use kimi-k2.7-code instead"), but Feynman still picked it as the default for new OpenCode users. It now recommends `kimi-k2.7-code`. If `feynman status` shows `kimi-k2.6`, switch with `feynman model set opencode-go/kimi-k2.7-code`. Three model preferences that no longer exist in the catalog were removed.
|
|
12
|
+
- A failed literature database request now names the service, for example `www.ebi.ac.uk request failed: 503`, instead of "Science database request failed".
|
|
13
|
+
|
|
14
|
+
## v0.5.12 - 2026-09-28
|
|
15
|
+
|
|
16
|
+
- Crossref pacing leaves a margin over the pool's limit and retries a rate-limited request once after the server's `Retry-After`. A stress test of three bursts of 10 parallel searches on the public pool now succeeds on all 30; 0.5.11 still lost about one in six to network jitter.
|
|
17
|
+
|
|
9
18
|
## v0.5.11 - 2026-09-27
|
|
10
19
|
|
|
11
20
|
- **Crossref lookups no longer fail in bursts.** Crossref's public pool allows one request at a time, one per second, and parallel DOI checks (the verifier cross-checks every citation) got `429 Too Many Requests` on most calls. Crossref requests now run one after another at the pool's pace. Set `CROSSREF_MAILTO` to your email for Crossref's faster polite pool; a 429 now says so instead of a generic "Science database request failed".
|
package/dist/model/catalog.js
CHANGED
|
@@ -72,9 +72,9 @@ const RESEARCH_MODEL_FAMILY_PREFERENCES = [
|
|
|
72
72
|
},
|
|
73
73
|
];
|
|
74
74
|
const RESEARCH_MODEL_FALLBACK_PREFERENCES = [
|
|
75
|
-
exactResearchModel("opencode/kimi-k2.
|
|
75
|
+
exactResearchModel("opencode/kimi-k2.7-code", "good OpenCode Zen fallback for coding and research work"),
|
|
76
76
|
exactResearchModel("opencode/minimax-m2.7", "good OpenCode Zen fallback for source-heavy research work"),
|
|
77
|
-
exactResearchModel("opencode-go/kimi-k2.
|
|
77
|
+
exactResearchModel("opencode-go/kimi-k2.7-code", "recommended OpenCode Go model for coding and research work"),
|
|
78
78
|
exactResearchModel("opencode-go/minimax-m3", "good OpenCode Go fallback for source-heavy research work"),
|
|
79
79
|
exactResearchModel("opencode-go/qwen3.7-max", "good OpenCode Go fallback for source-heavy research work"),
|
|
80
80
|
exactResearchModel("opencode-go/glm-5.1", "good OpenCode Go fallback for GLM-backed research work"),
|
|
@@ -83,13 +83,10 @@ const RESEARCH_MODEL_FALLBACK_PREFERENCES = [
|
|
|
83
83
|
matches: (model) => model.provider === "openrouter" && /^openai\/gpt-\d+(?:\.\d+)*(?:-.+)?$/i.test(model.id),
|
|
84
84
|
reason: "newest OpenRouter OpenAI GPT fallback when direct OpenAI access is unavailable",
|
|
85
85
|
},
|
|
86
|
-
exactResearchModel("zai/glm-5", "good fallback when GLM is the available research model"),
|
|
87
86
|
exactResearchModel("minimax/MiniMax-M3", "good fallback when MiniMax is the available research model"),
|
|
88
87
|
exactResearchModel("minimax/MiniMax-M2.7", "good fallback when MiniMax is the available research model"),
|
|
89
88
|
exactResearchModel("minimax/MiniMax-M2.7-highspeed", "good fallback when MiniMax is the available research model"),
|
|
90
89
|
exactResearchModel("kimi-coding/kimi-for-coding", "Kimi Coding Plan stable ID, auto-maps to the latest backend model"),
|
|
91
|
-
exactResearchModel("kimi-coding/k2p6", "Kimi K2.6 with strong reasoning for coding and research tasks"),
|
|
92
|
-
exactResearchModel("kimi-coding/kimi-k2-thinking", "good fallback when Kimi is the available research model"),
|
|
93
90
|
];
|
|
94
91
|
const PROVIDER_SORT_ORDER = [
|
|
95
92
|
"anthropic",
|
|
@@ -36,7 +36,7 @@ async function fetchText(url: URL, accept: string): Promise<string> {
|
|
|
36
36
|
signal: controller.signal,
|
|
37
37
|
});
|
|
38
38
|
if (!response.ok) {
|
|
39
|
-
throw new Error(
|
|
39
|
+
throw new Error(`${url.hostname} request failed: ${response.status} ${response.statusText}`);
|
|
40
40
|
}
|
|
41
41
|
return response.text();
|
|
42
42
|
} finally {
|
|
@@ -95,7 +95,7 @@ async function fetchJson(url: URL, headers: Record<string, string> = {}): Promis
|
|
|
95
95
|
});
|
|
96
96
|
if (!response.ok) {
|
|
97
97
|
throw new ScienceDatabaseRequestError(
|
|
98
|
-
|
|
98
|
+
`${url.hostname} request failed: ${response.status} ${response.statusText}`,
|
|
99
99
|
response.status,
|
|
100
100
|
retryAfterMs(response.headers.get("retry-after")),
|
|
101
101
|
);
|
|
@@ -145,7 +145,9 @@ let crossrefQueue: Promise<unknown> = Promise.resolve();
|
|
|
145
145
|
let crossrefLastStartedAt = Number.NEGATIVE_INFINITY;
|
|
146
146
|
|
|
147
147
|
export function withCrossrefPacing<T>(polite: boolean, run: () => Promise<T>): Promise<T> {
|
|
148
|
-
|
|
148
|
+
// A little over the pool's limit: network jitter can land two requests paced
|
|
149
|
+
// exactly one second apart inside the same window.
|
|
150
|
+
const minGapMs = polite ? 400 : 1200;
|
|
149
151
|
const next = crossrefQueue.then(async () => {
|
|
150
152
|
const wait = crossrefLastStartedAt + minGapMs - Date.now();
|
|
151
153
|
if (wait > 0) await new Promise((resolve) => setTimeout(resolve, wait));
|
|
@@ -167,9 +169,16 @@ async function searchCrossref(params: ScienceDatabaseSearchParams): Promise<Reco
|
|
|
167
169
|
select: "DOI,title,published-print,published-online,issued,container-title,author,is-referenced-by-count,URL,type",
|
|
168
170
|
...(mailto ? { mailto } : {}),
|
|
169
171
|
}).toString();
|
|
172
|
+
const request = () => withCrossrefPacing(Boolean(mailto), () => fetchJson(url));
|
|
170
173
|
let payload: Record<string, unknown>;
|
|
171
174
|
try {
|
|
172
|
-
|
|
175
|
+
try {
|
|
176
|
+
payload = recordValue(await request());
|
|
177
|
+
} catch (error) {
|
|
178
|
+
if (!(error instanceof ScienceDatabaseRequestError) || error.status !== 429) throw error;
|
|
179
|
+
await new Promise((resolve) => setTimeout(resolve, Math.min(error.retryAfterMs ?? 1500, 5000)));
|
|
180
|
+
payload = recordValue(await request());
|
|
181
|
+
}
|
|
173
182
|
} catch (error) {
|
|
174
183
|
if (!(error instanceof ScienceDatabaseRequestError) || error.status !== 429) throw error;
|
|
175
184
|
throw new Error(
|