Skip to content

Commit f127210

Browse files
Talha Jubair Siamtsensei
authored andcommitted
fix(review): address round-2 code review findings on PR #42
- factory.ts: don't use apiKey (openai-compatible endpoint key) when falling back to Anthropic for VLM verification; use env var only - worker.ts: remove redundant SearchProviderKey cast now that the type is correct on JobData - HomePage.tsx: add openrouter and openai-compatible to DISPLAY_NAMES, remove dead ollama entry
1 parent 39c9f90 commit f127210

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/providers/factory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ export function createVerificationModel(
229229
if (!baseUrl) {
230230
// BYOK path: base URL was passed via job keys, not env var.
231231
// Fall back to Anthropic for stock verification (needs VLM).
232-
const antKey = apiKey ?? process.env["ANTHROPIC_API_KEY"];
232+
const antKey = process.env["ANTHROPIC_API_KEY"];
233233
if (!antKey) {
234234
throw new Error(
235235
"Stock verification requires a VLM. Set OPENREELS_LLM_BASE_URL or ANTHROPIC_API_KEY, or use --no-stock-verify.",

src/worker.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,7 @@ const worker = new Worker<JobData>(
129129
keys,
130130
llmModel: providers.llmModel,
131131
llmBaseUrl: providers.llmBaseUrl,
132-
searchProvider: providers.searchProvider as
133-
| import("./schema/providers.js").SearchProviderKey
134-
| undefined,
132+
searchProvider: providers.searchProvider,
135133
});
136134

137135
// Build callbacks that emit BullMQ progress events and update meta.json

web/src/pages/HomePage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ const DISPLAY_NAMES: Record<string, string> = {
6161
anthropic: "Anthropic (Claude)",
6262
openai: "OpenAI (GPT)",
6363
gemini: "Google Gemini",
64-
ollama: "Ollama (Local)",
64+
openrouter: "OpenRouter",
65+
"openai-compatible": "Custom (OpenAI-compatible)",
6566
// TTS
6667
elevenlabs: "ElevenLabs",
6768
inworld: "Inworld",

0 commit comments

Comments
 (0)