johns-harness 2026.11.20 → 2026.11.29
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 +27 -0
- package/dist/audio-transcription-runner-CntsvD7H.js +26 -5
- package/dist/audio-transcription-runner-DPzqXt3G.js +26 -5
- package/dist/audio-transcription-runner-DfRfzdqH.js +26 -5
- package/dist/audio-transcription-runner-DldZwQqa.js +26 -5
- package/dist/plugin-sdk/audio-transcription-runner-BKRoAe2_.js +26 -5
- package/dist/plugin-sdk/audio-transcription-runner-BRykE3qr.js +26 -5
- package/dist/plugin-sdk/audio-transcription-runner-BktijAfd.js +26 -5
- package/dist/plugin-sdk/audio-transcription-runner-Bsyu4xAK.js +26 -5
- package/dist/plugin-sdk/audio-transcription-runner-DDBSv70C.js +26 -5
- package/dist/plugin-sdk/audio-transcription-runner-SuEVMoyi.js +26 -5
- package/dist/update-command.js +89 -0
- package/docs/NATIVE-WHISPER-MUSE.md +15 -6
- package/docs/PATCHES.md +49 -0
- package/docs/nodes/audio.md +11 -6
- package/docs/nodes/media-understanding.md +7 -7
- package/node_modules/mr-memory/index.js +17 -1
- package/package.json +1 -1
- package/skills/openai-whisper/SKILL.md +2 -0
- package/skills/openai-whisper-api/SKILL.md +2 -0
- package/vendor/patched-deps/mr-memory/index.js +1852 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026.11.29
|
|
4
|
+
|
|
5
|
+
### MemoryRouter saves only the main chat
|
|
6
|
+
|
|
7
|
+
- **`mr-memory` no longer stores subagent, cron, hook or swarm-member turns (Family 100).** Its `agent_end` hook used to store the last user+assistant exchange of every run. The only guards were `isReadOnlyAgent` (agent-scoped) and the auto-consolidation session, and worker runs share the same agent id and workspace as the main chat, so neither could separate them.
|
|
8
|
+
- **Capture is now scoped to the primary session**, `agent:<id>:main`. `isNonPrimarySession(sessionKey)` decides it and `agent_end` returns before the vault key is resolved.
|
|
9
|
+
- **A `[cron:…]` prompt is no longer laundered into a user turn.** The noise check now runs on the raw text before `stripSystemPrefixes` deletes the only marker the cron pattern matches.
|
|
10
|
+
- **Reads are unchanged on purpose.** Subagents, crons, hooks and swarm members still receive vault context from both prompt hooks; only the write path is limited. `readOnlyAgents` and every other plugin feature keep working.
|
|
11
|
+
- **`/update` delivers the fix to an existing installed copy.** An installed `<state>/extensions/mr-memory` stays authoritative over the bundled copy and `updateNpmInstalledPlugins` only reinstalls the pinned npm spec, so `/update` now ports these three edits into that copy in place after a successful install and before the restart. It keeps whatever else the copy carries (today: a hand-backported `readOnlyAgents` guard), writes a `.bak` first, is idempotent, and skips with a log line rather than guessing if the file has drifted.
|
|
12
|
+
- Also fills in the missed manifest flag: the installed copy's manifest now declares `kind: "memory"`, so the memory slot matches without a per-deployment edit.
|
|
13
|
+
- **Scope:** the bundled dependency patch, one `/update` step, its manifest flag, tests, verifier and docs. No model, channel, credential, tool-surface or default-model change; no global install, no restart.
|
|
14
|
+
- **Gates:** verifier **610 pass, 0 fail**; full suite **1,426 pass, 0 fail, 5 skip** (1,431 tests); Family 100 patcher replays `dist/update-command.js` byte for byte; packed-artifact and secret checks clean.
|
|
15
|
+
- **Rollback:** `npm i -g johns-harness@2026.11.23`.
|
|
16
|
+
|
|
17
|
+
## 2026.11.23
|
|
18
|
+
|
|
19
|
+
### The OpenAI Whisper API is the standard audio transcription method
|
|
20
|
+
|
|
21
|
+
- **Voice notes and inbound audio now go to the OpenAI Whisper API (`whisper-1`) by default (Family 99).** With no `tools.media.audio.models` configured, audio is transcribed by provider `openai`, model `whisper-1`, tried first. The key resolves in the standard order: `OPENAI_API_KEY`, an `openai` auth profile, or `models.providers.openai.apiKey`. Nothing is written to a user config; a stock harness picks this up on install.
|
|
22
|
+
- **Before:** the default depended on what was installed. A machine with a local Whisper binary (sherpa-onnx, whisper.cpp or Python Whisper) transcribed locally and never reached the API, and a machine with only an OpenAI key sent `gpt-4o-mini-transcribe`.
|
|
23
|
+
- **Local Whisper is no longer picked automatically**, installed or not. An explicit `type: "cli"` entry in `tools.media.audio.models` still works exactly as Family 52 defines it, with the same no-shell and bounded-output rules.
|
|
24
|
+
- `DEFAULT_AUDIO_MODELS.openai` is now `whisper-1`, so an OpenAI audio entry with no model uses Whisper. Explicit `tools.media.audio.models` configuration still wins in every case.
|
|
25
|
+
- **With no OpenAI credential**, auto-detection falls through to the rest of the existing order (the active reply model's provider when it can transcribe, the Gemini CLI, then other provider keys) and never runs a local CLI.
|
|
26
|
+
- **Scope:** audio transcription at ingress only. Images and video are untouched. No agent tool, channel, config, credential, model-catalog or default-model change.
|
|
27
|
+
- **Gates:** master check **816 cards, 0 problems**; sync **0 stale**; verifier **603 pass, 0 fail**; full suite **1,420 pass, 0 fail, 5 skip** (1,425 tests), including a loopback `POST /v1/audio/transcriptions` that carries `model=whisper-1`. No hosted OpenAI call was made. Packed-artifact check passed.
|
|
28
|
+
- **Rollback:** `npm i -g johns-harness@2026.11.20`.
|
|
29
|
+
|
|
3
30
|
## 2026.11.20
|
|
4
31
|
|
|
5
32
|
- Fixed a 400 error when GPT-6.2 Astra or Sol fell back from a Codex subscription to the native OpenAI API. A legacy Chat Completions setting could send function tools and reasoning to the wrong endpoint. Both models now use `/v1/responses` on the native API and keep the requested reasoning level. Subscription routing, custom endpoints, and older models are unchanged.
|
|
@@ -68,7 +68,7 @@ const DEFAULT_PROMPT = {
|
|
|
68
68
|
const DEFAULT_VIDEO_MAX_BASE64_BYTES = 70 * MB;
|
|
69
69
|
const DEFAULT_AUDIO_MODELS = {
|
|
70
70
|
groq: "whisper-large-v3-turbo",
|
|
71
|
-
openai: "
|
|
71
|
+
openai: "whisper-1", // JOHNNESS_PATCH_WHISPER_API_99: Whisper is the standard OpenAI audio model
|
|
72
72
|
deepgram: "nova-3",
|
|
73
73
|
mistral: "voxtral-mini-latest"
|
|
74
74
|
};
|
|
@@ -1751,6 +1751,27 @@ async function resolveGeminiCliEntry(_capability) {
|
|
|
1751
1751
|
]
|
|
1752
1752
|
};
|
|
1753
1753
|
}
|
|
1754
|
+
// JOHNNESS_PATCH_WHISPER_API_99: the OpenAI Whisper API is the standard transcription method.
|
|
1755
|
+
const WHISPER_API_PROVIDER = "openai";
|
|
1756
|
+
const WHISPER_API_MODEL = "whisper-1";
|
|
1757
|
+
async function resolveWhisperApiEntry(params) {
|
|
1758
|
+
const provider = getMediaUnderstandingProvider(WHISPER_API_PROVIDER, params.providerRegistry);
|
|
1759
|
+
if (!provider?.transcribeAudio) return null;
|
|
1760
|
+
try {
|
|
1761
|
+
await resolveApiKeyForProvider({
|
|
1762
|
+
provider: WHISPER_API_PROVIDER,
|
|
1763
|
+
cfg: params.cfg,
|
|
1764
|
+
agentDir: params.agentDir
|
|
1765
|
+
});
|
|
1766
|
+
} catch {
|
|
1767
|
+
return null;
|
|
1768
|
+
}
|
|
1769
|
+
return {
|
|
1770
|
+
type: "provider",
|
|
1771
|
+
provider: WHISPER_API_PROVIDER,
|
|
1772
|
+
model: WHISPER_API_MODEL
|
|
1773
|
+
};
|
|
1774
|
+
}
|
|
1754
1775
|
async function resolveKeyEntry(params) {
|
|
1755
1776
|
const { cfg, agentDir, providerRegistry, capability } = params;
|
|
1756
1777
|
const checkProvider = async (providerId, model) => {
|
|
@@ -1829,12 +1850,12 @@ function resolveImageModelFromAgentDefaults(cfg) {
|
|
|
1829
1850
|
return entries;
|
|
1830
1851
|
}
|
|
1831
1852
|
async function resolveAutoEntries(params) {
|
|
1832
|
-
const activeEntry = await resolveActiveModelEntry(params);
|
|
1833
|
-
if (activeEntry) return [activeEntry];
|
|
1834
1853
|
if (params.capability === "audio") {
|
|
1835
|
-
const
|
|
1836
|
-
if (
|
|
1854
|
+
const whisperApi = await resolveWhisperApiEntry(params); // JOHNNESS_PATCH_WHISPER_API_99: the standard method, ahead of every local CLI
|
|
1855
|
+
if (whisperApi) return [whisperApi];
|
|
1837
1856
|
}
|
|
1857
|
+
const activeEntry = await resolveActiveModelEntry(params);
|
|
1858
|
+
if (activeEntry) return [activeEntry];
|
|
1838
1859
|
if (params.capability === "image") {
|
|
1839
1860
|
const imageModelEntries = resolveImageModelFromAgentDefaults(params.cfg);
|
|
1840
1861
|
if (imageModelEntries.length > 0) return imageModelEntries;
|
|
@@ -618,7 +618,7 @@ const DEFAULT_PROMPT = {
|
|
|
618
618
|
const DEFAULT_VIDEO_MAX_BASE64_BYTES = 70 * MB;
|
|
619
619
|
const DEFAULT_AUDIO_MODELS = {
|
|
620
620
|
groq: "whisper-large-v3-turbo",
|
|
621
|
-
openai: "
|
|
621
|
+
openai: "whisper-1", // JOHNNESS_PATCH_WHISPER_API_99: Whisper is the standard OpenAI audio model
|
|
622
622
|
deepgram: "nova-3",
|
|
623
623
|
mistral: "voxtral-mini-latest"
|
|
624
624
|
};
|
|
@@ -1751,6 +1751,27 @@ async function resolveGeminiCliEntry(_capability) {
|
|
|
1751
1751
|
]
|
|
1752
1752
|
};
|
|
1753
1753
|
}
|
|
1754
|
+
// JOHNNESS_PATCH_WHISPER_API_99: the OpenAI Whisper API is the standard transcription method.
|
|
1755
|
+
const WHISPER_API_PROVIDER = "openai";
|
|
1756
|
+
const WHISPER_API_MODEL = "whisper-1";
|
|
1757
|
+
async function resolveWhisperApiEntry(params) {
|
|
1758
|
+
const provider = getMediaUnderstandingProvider(WHISPER_API_PROVIDER, params.providerRegistry);
|
|
1759
|
+
if (!provider?.transcribeAudio) return null;
|
|
1760
|
+
try {
|
|
1761
|
+
await resolveApiKeyForProvider({
|
|
1762
|
+
provider: WHISPER_API_PROVIDER,
|
|
1763
|
+
cfg: params.cfg,
|
|
1764
|
+
agentDir: params.agentDir
|
|
1765
|
+
});
|
|
1766
|
+
} catch {
|
|
1767
|
+
return null;
|
|
1768
|
+
}
|
|
1769
|
+
return {
|
|
1770
|
+
type: "provider",
|
|
1771
|
+
provider: WHISPER_API_PROVIDER,
|
|
1772
|
+
model: WHISPER_API_MODEL
|
|
1773
|
+
};
|
|
1774
|
+
}
|
|
1754
1775
|
async function resolveKeyEntry(params) {
|
|
1755
1776
|
const { cfg, agentDir, providerRegistry, capability } = params;
|
|
1756
1777
|
const checkProvider = async (providerId, model) => {
|
|
@@ -1829,12 +1850,12 @@ function resolveImageModelFromAgentDefaults(cfg) {
|
|
|
1829
1850
|
return entries;
|
|
1830
1851
|
}
|
|
1831
1852
|
async function resolveAutoEntries(params) {
|
|
1832
|
-
const activeEntry = await resolveActiveModelEntry(params);
|
|
1833
|
-
if (activeEntry) return [activeEntry];
|
|
1834
1853
|
if (params.capability === "audio") {
|
|
1835
|
-
const
|
|
1836
|
-
if (
|
|
1854
|
+
const whisperApi = await resolveWhisperApiEntry(params); // JOHNNESS_PATCH_WHISPER_API_99: the standard method, ahead of every local CLI
|
|
1855
|
+
if (whisperApi) return [whisperApi];
|
|
1837
1856
|
}
|
|
1857
|
+
const activeEntry = await resolveActiveModelEntry(params);
|
|
1858
|
+
if (activeEntry) return [activeEntry];
|
|
1838
1859
|
if (params.capability === "image") {
|
|
1839
1860
|
const imageModelEntries = resolveImageModelFromAgentDefaults(params.cfg);
|
|
1840
1861
|
if (imageModelEntries.length > 0) return imageModelEntries;
|
|
@@ -632,7 +632,7 @@ const DEFAULT_PROMPT = {
|
|
|
632
632
|
const DEFAULT_VIDEO_MAX_BASE64_BYTES = 70 * MB;
|
|
633
633
|
const DEFAULT_AUDIO_MODELS = {
|
|
634
634
|
groq: "whisper-large-v3-turbo",
|
|
635
|
-
openai: "
|
|
635
|
+
openai: "whisper-1", // JOHNNESS_PATCH_WHISPER_API_99: Whisper is the standard OpenAI audio model
|
|
636
636
|
deepgram: "nova-3",
|
|
637
637
|
mistral: "voxtral-mini-latest"
|
|
638
638
|
};
|
|
@@ -1765,6 +1765,27 @@ async function resolveGeminiCliEntry(_capability) {
|
|
|
1765
1765
|
]
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
|
+
// JOHNNESS_PATCH_WHISPER_API_99: the OpenAI Whisper API is the standard transcription method.
|
|
1769
|
+
const WHISPER_API_PROVIDER = "openai";
|
|
1770
|
+
const WHISPER_API_MODEL = "whisper-1";
|
|
1771
|
+
async function resolveWhisperApiEntry(params) {
|
|
1772
|
+
const provider = getMediaUnderstandingProvider(WHISPER_API_PROVIDER, params.providerRegistry);
|
|
1773
|
+
if (!provider?.transcribeAudio) return null;
|
|
1774
|
+
try {
|
|
1775
|
+
await resolveApiKeyForProvider({
|
|
1776
|
+
provider: WHISPER_API_PROVIDER,
|
|
1777
|
+
cfg: params.cfg,
|
|
1778
|
+
agentDir: params.agentDir
|
|
1779
|
+
});
|
|
1780
|
+
} catch {
|
|
1781
|
+
return null;
|
|
1782
|
+
}
|
|
1783
|
+
return {
|
|
1784
|
+
type: "provider",
|
|
1785
|
+
provider: WHISPER_API_PROVIDER,
|
|
1786
|
+
model: WHISPER_API_MODEL
|
|
1787
|
+
};
|
|
1788
|
+
}
|
|
1768
1789
|
async function resolveKeyEntry(params) {
|
|
1769
1790
|
const { cfg, agentDir, providerRegistry, capability } = params;
|
|
1770
1791
|
const checkProvider = async (providerId, model) => {
|
|
@@ -1843,12 +1864,12 @@ function resolveImageModelFromAgentDefaults(cfg) {
|
|
|
1843
1864
|
return entries;
|
|
1844
1865
|
}
|
|
1845
1866
|
async function resolveAutoEntries(params) {
|
|
1846
|
-
const activeEntry = await resolveActiveModelEntry(params);
|
|
1847
|
-
if (activeEntry) return [activeEntry];
|
|
1848
1867
|
if (params.capability === "audio") {
|
|
1849
|
-
const
|
|
1850
|
-
if (
|
|
1868
|
+
const whisperApi = await resolveWhisperApiEntry(params); // JOHNNESS_PATCH_WHISPER_API_99: the standard method, ahead of every local CLI
|
|
1869
|
+
if (whisperApi) return [whisperApi];
|
|
1851
1870
|
}
|
|
1871
|
+
const activeEntry = await resolveActiveModelEntry(params);
|
|
1872
|
+
if (activeEntry) return [activeEntry];
|
|
1852
1873
|
if (params.capability === "image") {
|
|
1853
1874
|
const imageModelEntries = resolveImageModelFromAgentDefaults(params.cfg);
|
|
1854
1875
|
if (imageModelEntries.length > 0) return imageModelEntries;
|
|
@@ -631,7 +631,7 @@ const DEFAULT_PROMPT = {
|
|
|
631
631
|
const DEFAULT_VIDEO_MAX_BASE64_BYTES = 70 * MB;
|
|
632
632
|
const DEFAULT_AUDIO_MODELS = {
|
|
633
633
|
groq: "whisper-large-v3-turbo",
|
|
634
|
-
openai: "
|
|
634
|
+
openai: "whisper-1", // JOHNNESS_PATCH_WHISPER_API_99: Whisper is the standard OpenAI audio model
|
|
635
635
|
deepgram: "nova-3",
|
|
636
636
|
mistral: "voxtral-mini-latest"
|
|
637
637
|
};
|
|
@@ -1764,6 +1764,27 @@ async function resolveGeminiCliEntry(_capability) {
|
|
|
1764
1764
|
]
|
|
1765
1765
|
};
|
|
1766
1766
|
}
|
|
1767
|
+
// JOHNNESS_PATCH_WHISPER_API_99: the OpenAI Whisper API is the standard transcription method.
|
|
1768
|
+
const WHISPER_API_PROVIDER = "openai";
|
|
1769
|
+
const WHISPER_API_MODEL = "whisper-1";
|
|
1770
|
+
async function resolveWhisperApiEntry(params) {
|
|
1771
|
+
const provider = getMediaUnderstandingProvider(WHISPER_API_PROVIDER, params.providerRegistry);
|
|
1772
|
+
if (!provider?.transcribeAudio) return null;
|
|
1773
|
+
try {
|
|
1774
|
+
await resolveApiKeyForProvider({
|
|
1775
|
+
provider: WHISPER_API_PROVIDER,
|
|
1776
|
+
cfg: params.cfg,
|
|
1777
|
+
agentDir: params.agentDir
|
|
1778
|
+
});
|
|
1779
|
+
} catch {
|
|
1780
|
+
return null;
|
|
1781
|
+
}
|
|
1782
|
+
return {
|
|
1783
|
+
type: "provider",
|
|
1784
|
+
provider: WHISPER_API_PROVIDER,
|
|
1785
|
+
model: WHISPER_API_MODEL
|
|
1786
|
+
};
|
|
1787
|
+
}
|
|
1767
1788
|
async function resolveKeyEntry(params) {
|
|
1768
1789
|
const { cfg, agentDir, providerRegistry, capability } = params;
|
|
1769
1790
|
const checkProvider = async (providerId, model) => {
|
|
@@ -1842,12 +1863,12 @@ function resolveImageModelFromAgentDefaults(cfg) {
|
|
|
1842
1863
|
return entries;
|
|
1843
1864
|
}
|
|
1844
1865
|
async function resolveAutoEntries(params) {
|
|
1845
|
-
const activeEntry = await resolveActiveModelEntry(params);
|
|
1846
|
-
if (activeEntry) return [activeEntry];
|
|
1847
1866
|
if (params.capability === "audio") {
|
|
1848
|
-
const
|
|
1849
|
-
if (
|
|
1867
|
+
const whisperApi = await resolveWhisperApiEntry(params); // JOHNNESS_PATCH_WHISPER_API_99: the standard method, ahead of every local CLI
|
|
1868
|
+
if (whisperApi) return [whisperApi];
|
|
1850
1869
|
}
|
|
1870
|
+
const activeEntry = await resolveActiveModelEntry(params);
|
|
1871
|
+
if (activeEntry) return [activeEntry];
|
|
1851
1872
|
if (params.capability === "image") {
|
|
1852
1873
|
const imageModelEntries = resolveImageModelFromAgentDefaults(params.cfg);
|
|
1853
1874
|
if (imageModelEntries.length > 0) return imageModelEntries;
|
|
@@ -67,7 +67,7 @@ const DEFAULT_PROMPT = {
|
|
|
67
67
|
const DEFAULT_VIDEO_MAX_BASE64_BYTES = 70 * MB;
|
|
68
68
|
const DEFAULT_AUDIO_MODELS = {
|
|
69
69
|
groq: "whisper-large-v3-turbo",
|
|
70
|
-
openai: "
|
|
70
|
+
openai: "whisper-1", // JOHNNESS_PATCH_WHISPER_API_99: Whisper is the standard OpenAI audio model
|
|
71
71
|
deepgram: "nova-3",
|
|
72
72
|
mistral: "voxtral-mini-latest"
|
|
73
73
|
};
|
|
@@ -1764,6 +1764,27 @@ async function resolveGeminiCliEntry(_capability) {
|
|
|
1764
1764
|
]
|
|
1765
1765
|
};
|
|
1766
1766
|
}
|
|
1767
|
+
// JOHNNESS_PATCH_WHISPER_API_99: the OpenAI Whisper API is the standard transcription method.
|
|
1768
|
+
const WHISPER_API_PROVIDER = "openai";
|
|
1769
|
+
const WHISPER_API_MODEL = "whisper-1";
|
|
1770
|
+
async function resolveWhisperApiEntry(params) {
|
|
1771
|
+
const provider = getMediaUnderstandingProvider(WHISPER_API_PROVIDER, params.providerRegistry);
|
|
1772
|
+
if (!provider?.transcribeAudio) return null;
|
|
1773
|
+
try {
|
|
1774
|
+
await resolveApiKeyForProvider({
|
|
1775
|
+
provider: WHISPER_API_PROVIDER,
|
|
1776
|
+
cfg: params.cfg,
|
|
1777
|
+
agentDir: params.agentDir
|
|
1778
|
+
});
|
|
1779
|
+
} catch {
|
|
1780
|
+
return null;
|
|
1781
|
+
}
|
|
1782
|
+
return {
|
|
1783
|
+
type: "provider",
|
|
1784
|
+
provider: WHISPER_API_PROVIDER,
|
|
1785
|
+
model: WHISPER_API_MODEL
|
|
1786
|
+
};
|
|
1787
|
+
}
|
|
1767
1788
|
async function resolveKeyEntry(params) {
|
|
1768
1789
|
const { cfg, agentDir, providerRegistry, capability } = params;
|
|
1769
1790
|
const checkProvider = async (providerId, model) => {
|
|
@@ -1842,12 +1863,12 @@ function resolveImageModelFromAgentDefaults(cfg) {
|
|
|
1842
1863
|
return entries;
|
|
1843
1864
|
}
|
|
1844
1865
|
async function resolveAutoEntries(params) {
|
|
1845
|
-
const activeEntry = await resolveActiveModelEntry(params);
|
|
1846
|
-
if (activeEntry) return [activeEntry];
|
|
1847
1866
|
if (params.capability === "audio") {
|
|
1848
|
-
const
|
|
1849
|
-
if (
|
|
1867
|
+
const whisperApi = await resolveWhisperApiEntry(params); // JOHNNESS_PATCH_WHISPER_API_99: the standard method, ahead of every local CLI
|
|
1868
|
+
if (whisperApi) return [whisperApi];
|
|
1850
1869
|
}
|
|
1870
|
+
const activeEntry = await resolveActiveModelEntry(params);
|
|
1871
|
+
if (activeEntry) return [activeEntry];
|
|
1851
1872
|
if (params.capability === "image") {
|
|
1852
1873
|
const imageModelEntries = resolveImageModelFromAgentDefaults(params.cfg);
|
|
1853
1874
|
if (imageModelEntries.length > 0) return imageModelEntries;
|
|
@@ -67,7 +67,7 @@ const DEFAULT_PROMPT = {
|
|
|
67
67
|
const DEFAULT_VIDEO_MAX_BASE64_BYTES = 70 * MB;
|
|
68
68
|
const DEFAULT_AUDIO_MODELS = {
|
|
69
69
|
groq: "whisper-large-v3-turbo",
|
|
70
|
-
openai: "
|
|
70
|
+
openai: "whisper-1", // JOHNNESS_PATCH_WHISPER_API_99: Whisper is the standard OpenAI audio model
|
|
71
71
|
deepgram: "nova-3",
|
|
72
72
|
mistral: "voxtral-mini-latest"
|
|
73
73
|
};
|
|
@@ -1764,6 +1764,27 @@ async function resolveGeminiCliEntry(_capability) {
|
|
|
1764
1764
|
]
|
|
1765
1765
|
};
|
|
1766
1766
|
}
|
|
1767
|
+
// JOHNNESS_PATCH_WHISPER_API_99: the OpenAI Whisper API is the standard transcription method.
|
|
1768
|
+
const WHISPER_API_PROVIDER = "openai";
|
|
1769
|
+
const WHISPER_API_MODEL = "whisper-1";
|
|
1770
|
+
async function resolveWhisperApiEntry(params) {
|
|
1771
|
+
const provider = getMediaUnderstandingProvider(WHISPER_API_PROVIDER, params.providerRegistry);
|
|
1772
|
+
if (!provider?.transcribeAudio) return null;
|
|
1773
|
+
try {
|
|
1774
|
+
await resolveApiKeyForProvider({
|
|
1775
|
+
provider: WHISPER_API_PROVIDER,
|
|
1776
|
+
cfg: params.cfg,
|
|
1777
|
+
agentDir: params.agentDir
|
|
1778
|
+
});
|
|
1779
|
+
} catch {
|
|
1780
|
+
return null;
|
|
1781
|
+
}
|
|
1782
|
+
return {
|
|
1783
|
+
type: "provider",
|
|
1784
|
+
provider: WHISPER_API_PROVIDER,
|
|
1785
|
+
model: WHISPER_API_MODEL
|
|
1786
|
+
};
|
|
1787
|
+
}
|
|
1767
1788
|
async function resolveKeyEntry(params) {
|
|
1768
1789
|
const { cfg, agentDir, providerRegistry, capability } = params;
|
|
1769
1790
|
const checkProvider = async (providerId, model) => {
|
|
@@ -1842,12 +1863,12 @@ function resolveImageModelFromAgentDefaults(cfg) {
|
|
|
1842
1863
|
return entries;
|
|
1843
1864
|
}
|
|
1844
1865
|
async function resolveAutoEntries(params) {
|
|
1845
|
-
const activeEntry = await resolveActiveModelEntry(params);
|
|
1846
|
-
if (activeEntry) return [activeEntry];
|
|
1847
1866
|
if (params.capability === "audio") {
|
|
1848
|
-
const
|
|
1849
|
-
if (
|
|
1867
|
+
const whisperApi = await resolveWhisperApiEntry(params); // JOHNNESS_PATCH_WHISPER_API_99: the standard method, ahead of every local CLI
|
|
1868
|
+
if (whisperApi) return [whisperApi];
|
|
1850
1869
|
}
|
|
1870
|
+
const activeEntry = await resolveActiveModelEntry(params);
|
|
1871
|
+
if (activeEntry) return [activeEntry];
|
|
1851
1872
|
if (params.capability === "image") {
|
|
1852
1873
|
const imageModelEntries = resolveImageModelFromAgentDefaults(params.cfg);
|
|
1853
1874
|
if (imageModelEntries.length > 0) return imageModelEntries;
|
|
@@ -67,7 +67,7 @@ const DEFAULT_PROMPT = {
|
|
|
67
67
|
const DEFAULT_VIDEO_MAX_BASE64_BYTES = 70 * MB;
|
|
68
68
|
const DEFAULT_AUDIO_MODELS = {
|
|
69
69
|
groq: "whisper-large-v3-turbo",
|
|
70
|
-
openai: "
|
|
70
|
+
openai: "whisper-1", // JOHNNESS_PATCH_WHISPER_API_99: Whisper is the standard OpenAI audio model
|
|
71
71
|
deepgram: "nova-3",
|
|
72
72
|
mistral: "voxtral-mini-latest"
|
|
73
73
|
};
|
|
@@ -1764,6 +1764,27 @@ async function resolveGeminiCliEntry(_capability) {
|
|
|
1764
1764
|
]
|
|
1765
1765
|
};
|
|
1766
1766
|
}
|
|
1767
|
+
// JOHNNESS_PATCH_WHISPER_API_99: the OpenAI Whisper API is the standard transcription method.
|
|
1768
|
+
const WHISPER_API_PROVIDER = "openai";
|
|
1769
|
+
const WHISPER_API_MODEL = "whisper-1";
|
|
1770
|
+
async function resolveWhisperApiEntry(params) {
|
|
1771
|
+
const provider = getMediaUnderstandingProvider(WHISPER_API_PROVIDER, params.providerRegistry);
|
|
1772
|
+
if (!provider?.transcribeAudio) return null;
|
|
1773
|
+
try {
|
|
1774
|
+
await resolveApiKeyForProvider({
|
|
1775
|
+
provider: WHISPER_API_PROVIDER,
|
|
1776
|
+
cfg: params.cfg,
|
|
1777
|
+
agentDir: params.agentDir
|
|
1778
|
+
});
|
|
1779
|
+
} catch {
|
|
1780
|
+
return null;
|
|
1781
|
+
}
|
|
1782
|
+
return {
|
|
1783
|
+
type: "provider",
|
|
1784
|
+
provider: WHISPER_API_PROVIDER,
|
|
1785
|
+
model: WHISPER_API_MODEL
|
|
1786
|
+
};
|
|
1787
|
+
}
|
|
1767
1788
|
async function resolveKeyEntry(params) {
|
|
1768
1789
|
const { cfg, agentDir, providerRegistry, capability } = params;
|
|
1769
1790
|
const checkProvider = async (providerId, model) => {
|
|
@@ -1842,12 +1863,12 @@ function resolveImageModelFromAgentDefaults(cfg) {
|
|
|
1842
1863
|
return entries;
|
|
1843
1864
|
}
|
|
1844
1865
|
async function resolveAutoEntries(params) {
|
|
1845
|
-
const activeEntry = await resolveActiveModelEntry(params);
|
|
1846
|
-
if (activeEntry) return [activeEntry];
|
|
1847
1866
|
if (params.capability === "audio") {
|
|
1848
|
-
const
|
|
1849
|
-
if (
|
|
1867
|
+
const whisperApi = await resolveWhisperApiEntry(params); // JOHNNESS_PATCH_WHISPER_API_99: the standard method, ahead of every local CLI
|
|
1868
|
+
if (whisperApi) return [whisperApi];
|
|
1850
1869
|
}
|
|
1870
|
+
const activeEntry = await resolveActiveModelEntry(params);
|
|
1871
|
+
if (activeEntry) return [activeEntry];
|
|
1851
1872
|
if (params.capability === "image") {
|
|
1852
1873
|
const imageModelEntries = resolveImageModelFromAgentDefaults(params.cfg);
|
|
1853
1874
|
if (imageModelEntries.length > 0) return imageModelEntries;
|
|
@@ -67,7 +67,7 @@ const DEFAULT_PROMPT = {
|
|
|
67
67
|
const DEFAULT_VIDEO_MAX_BASE64_BYTES = 70 * MB;
|
|
68
68
|
const DEFAULT_AUDIO_MODELS = {
|
|
69
69
|
groq: "whisper-large-v3-turbo",
|
|
70
|
-
openai: "
|
|
70
|
+
openai: "whisper-1", // JOHNNESS_PATCH_WHISPER_API_99: Whisper is the standard OpenAI audio model
|
|
71
71
|
deepgram: "nova-3",
|
|
72
72
|
mistral: "voxtral-mini-latest"
|
|
73
73
|
};
|
|
@@ -1764,6 +1764,27 @@ async function resolveGeminiCliEntry(_capability) {
|
|
|
1764
1764
|
]
|
|
1765
1765
|
};
|
|
1766
1766
|
}
|
|
1767
|
+
// JOHNNESS_PATCH_WHISPER_API_99: the OpenAI Whisper API is the standard transcription method.
|
|
1768
|
+
const WHISPER_API_PROVIDER = "openai";
|
|
1769
|
+
const WHISPER_API_MODEL = "whisper-1";
|
|
1770
|
+
async function resolveWhisperApiEntry(params) {
|
|
1771
|
+
const provider = getMediaUnderstandingProvider(WHISPER_API_PROVIDER, params.providerRegistry);
|
|
1772
|
+
if (!provider?.transcribeAudio) return null;
|
|
1773
|
+
try {
|
|
1774
|
+
await resolveApiKeyForProvider({
|
|
1775
|
+
provider: WHISPER_API_PROVIDER,
|
|
1776
|
+
cfg: params.cfg,
|
|
1777
|
+
agentDir: params.agentDir
|
|
1778
|
+
});
|
|
1779
|
+
} catch {
|
|
1780
|
+
return null;
|
|
1781
|
+
}
|
|
1782
|
+
return {
|
|
1783
|
+
type: "provider",
|
|
1784
|
+
provider: WHISPER_API_PROVIDER,
|
|
1785
|
+
model: WHISPER_API_MODEL
|
|
1786
|
+
};
|
|
1787
|
+
}
|
|
1767
1788
|
async function resolveKeyEntry(params) {
|
|
1768
1789
|
const { cfg, agentDir, providerRegistry, capability } = params;
|
|
1769
1790
|
const checkProvider = async (providerId, model) => {
|
|
@@ -1842,12 +1863,12 @@ function resolveImageModelFromAgentDefaults(cfg) {
|
|
|
1842
1863
|
return entries;
|
|
1843
1864
|
}
|
|
1844
1865
|
async function resolveAutoEntries(params) {
|
|
1845
|
-
const activeEntry = await resolveActiveModelEntry(params);
|
|
1846
|
-
if (activeEntry) return [activeEntry];
|
|
1847
1866
|
if (params.capability === "audio") {
|
|
1848
|
-
const
|
|
1849
|
-
if (
|
|
1867
|
+
const whisperApi = await resolveWhisperApiEntry(params); // JOHNNESS_PATCH_WHISPER_API_99: the standard method, ahead of every local CLI
|
|
1868
|
+
if (whisperApi) return [whisperApi];
|
|
1850
1869
|
}
|
|
1870
|
+
const activeEntry = await resolveActiveModelEntry(params);
|
|
1871
|
+
if (activeEntry) return [activeEntry];
|
|
1851
1872
|
if (params.capability === "image") {
|
|
1852
1873
|
const imageModelEntries = resolveImageModelFromAgentDefaults(params.cfg);
|
|
1853
1874
|
if (imageModelEntries.length > 0) return imageModelEntries;
|
|
@@ -67,7 +67,7 @@ const DEFAULT_PROMPT = {
|
|
|
67
67
|
const DEFAULT_VIDEO_MAX_BASE64_BYTES = 70 * MB;
|
|
68
68
|
const DEFAULT_AUDIO_MODELS = {
|
|
69
69
|
groq: "whisper-large-v3-turbo",
|
|
70
|
-
openai: "
|
|
70
|
+
openai: "whisper-1", // JOHNNESS_PATCH_WHISPER_API_99: Whisper is the standard OpenAI audio model
|
|
71
71
|
deepgram: "nova-3",
|
|
72
72
|
mistral: "voxtral-mini-latest"
|
|
73
73
|
};
|
|
@@ -1788,6 +1788,27 @@ async function resolveGeminiCliEntry(_capability) {
|
|
|
1788
1788
|
]
|
|
1789
1789
|
};
|
|
1790
1790
|
}
|
|
1791
|
+
// JOHNNESS_PATCH_WHISPER_API_99: the OpenAI Whisper API is the standard transcription method.
|
|
1792
|
+
const WHISPER_API_PROVIDER = "openai";
|
|
1793
|
+
const WHISPER_API_MODEL = "whisper-1";
|
|
1794
|
+
async function resolveWhisperApiEntry(params) {
|
|
1795
|
+
const provider = getMediaUnderstandingProvider(WHISPER_API_PROVIDER, params.providerRegistry);
|
|
1796
|
+
if (!provider?.transcribeAudio) return null;
|
|
1797
|
+
try {
|
|
1798
|
+
await resolveApiKeyForProvider({
|
|
1799
|
+
provider: WHISPER_API_PROVIDER,
|
|
1800
|
+
cfg: params.cfg,
|
|
1801
|
+
agentDir: params.agentDir
|
|
1802
|
+
});
|
|
1803
|
+
} catch {
|
|
1804
|
+
return null;
|
|
1805
|
+
}
|
|
1806
|
+
return {
|
|
1807
|
+
type: "provider",
|
|
1808
|
+
provider: WHISPER_API_PROVIDER,
|
|
1809
|
+
model: WHISPER_API_MODEL
|
|
1810
|
+
};
|
|
1811
|
+
}
|
|
1791
1812
|
async function resolveKeyEntry(params) {
|
|
1792
1813
|
const { cfg, agentDir, providerRegistry, capability } = params;
|
|
1793
1814
|
const checkProvider = async (providerId, model) => {
|
|
@@ -1866,12 +1887,12 @@ function resolveImageModelFromAgentDefaults(cfg) {
|
|
|
1866
1887
|
return entries;
|
|
1867
1888
|
}
|
|
1868
1889
|
async function resolveAutoEntries(params) {
|
|
1869
|
-
const activeEntry = await resolveActiveModelEntry(params);
|
|
1870
|
-
if (activeEntry) return [activeEntry];
|
|
1871
1890
|
if (params.capability === "audio") {
|
|
1872
|
-
const
|
|
1873
|
-
if (
|
|
1891
|
+
const whisperApi = await resolveWhisperApiEntry(params); // JOHNNESS_PATCH_WHISPER_API_99: the standard method, ahead of every local CLI
|
|
1892
|
+
if (whisperApi) return [whisperApi];
|
|
1874
1893
|
}
|
|
1894
|
+
const activeEntry = await resolveActiveModelEntry(params);
|
|
1895
|
+
if (activeEntry) return [activeEntry];
|
|
1875
1896
|
if (params.capability === "image") {
|
|
1876
1897
|
const imageModelEntries = resolveImageModelFromAgentDefaults(params.cfg);
|
|
1877
1898
|
if (imageModelEntries.length > 0) return imageModelEntries;
|
|
@@ -67,7 +67,7 @@ const DEFAULT_PROMPT = {
|
|
|
67
67
|
const DEFAULT_VIDEO_MAX_BASE64_BYTES = 70 * MB;
|
|
68
68
|
const DEFAULT_AUDIO_MODELS = {
|
|
69
69
|
groq: "whisper-large-v3-turbo",
|
|
70
|
-
openai: "
|
|
70
|
+
openai: "whisper-1", // JOHNNESS_PATCH_WHISPER_API_99: Whisper is the standard OpenAI audio model
|
|
71
71
|
deepgram: "nova-3",
|
|
72
72
|
mistral: "voxtral-mini-latest"
|
|
73
73
|
};
|
|
@@ -1764,6 +1764,27 @@ async function resolveGeminiCliEntry(_capability) {
|
|
|
1764
1764
|
]
|
|
1765
1765
|
};
|
|
1766
1766
|
}
|
|
1767
|
+
// JOHNNESS_PATCH_WHISPER_API_99: the OpenAI Whisper API is the standard transcription method.
|
|
1768
|
+
const WHISPER_API_PROVIDER = "openai";
|
|
1769
|
+
const WHISPER_API_MODEL = "whisper-1";
|
|
1770
|
+
async function resolveWhisperApiEntry(params) {
|
|
1771
|
+
const provider = getMediaUnderstandingProvider(WHISPER_API_PROVIDER, params.providerRegistry);
|
|
1772
|
+
if (!provider?.transcribeAudio) return null;
|
|
1773
|
+
try {
|
|
1774
|
+
await resolveApiKeyForProvider({
|
|
1775
|
+
provider: WHISPER_API_PROVIDER,
|
|
1776
|
+
cfg: params.cfg,
|
|
1777
|
+
agentDir: params.agentDir
|
|
1778
|
+
});
|
|
1779
|
+
} catch {
|
|
1780
|
+
return null;
|
|
1781
|
+
}
|
|
1782
|
+
return {
|
|
1783
|
+
type: "provider",
|
|
1784
|
+
provider: WHISPER_API_PROVIDER,
|
|
1785
|
+
model: WHISPER_API_MODEL
|
|
1786
|
+
};
|
|
1787
|
+
}
|
|
1767
1788
|
async function resolveKeyEntry(params) {
|
|
1768
1789
|
const { cfg, agentDir, providerRegistry, capability } = params;
|
|
1769
1790
|
const checkProvider = async (providerId, model) => {
|
|
@@ -1842,12 +1863,12 @@ function resolveImageModelFromAgentDefaults(cfg) {
|
|
|
1842
1863
|
return entries;
|
|
1843
1864
|
}
|
|
1844
1865
|
async function resolveAutoEntries(params) {
|
|
1845
|
-
const activeEntry = await resolveActiveModelEntry(params);
|
|
1846
|
-
if (activeEntry) return [activeEntry];
|
|
1847
1866
|
if (params.capability === "audio") {
|
|
1848
|
-
const
|
|
1849
|
-
if (
|
|
1867
|
+
const whisperApi = await resolveWhisperApiEntry(params); // JOHNNESS_PATCH_WHISPER_API_99: the standard method, ahead of every local CLI
|
|
1868
|
+
if (whisperApi) return [whisperApi];
|
|
1850
1869
|
}
|
|
1870
|
+
const activeEntry = await resolveActiveModelEntry(params);
|
|
1871
|
+
if (activeEntry) return [activeEntry];
|
|
1851
1872
|
if (params.capability === "image") {
|
|
1852
1873
|
const imageModelEntries = resolveImageModelFromAgentDefaults(params.cfg);
|
|
1853
1874
|
if (imageModelEntries.length > 0) return imageModelEntries;
|