experiment(confidence-engine): route UI journey provider centrally
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { reconstructionV2Schema } from "../reconstruction/schema.js";
|
||||
import { isOpenAIUiJourneyExperiment, OPENAI_TERRA_MODEL } from "../config.js";
|
||||
|
||||
/**
|
||||
* Provider abstraction — the app calls getProvider() which returns an object
|
||||
@@ -9,9 +10,15 @@ import { reconstructionV2Schema } from "../reconstruction/schema.js";
|
||||
*/
|
||||
|
||||
export function getProvider() {
|
||||
if (isOpenAIUiJourneyExperiment()) return createOpenAIReconstructionProvider();
|
||||
return new OllamaLlmProvider();
|
||||
}
|
||||
|
||||
/** Server-owned model resolution for the configured application provider. */
|
||||
export function getProviderModelName() {
|
||||
return isOpenAIUiJourneyExperiment() ? OPENAI_TERRA_MODEL : process.env.OLLAMA_MODEL ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Experiment-only construction seam. Production provider selection remains Ollama.
|
||||
* @param {{ apiKey?: string, fetchImpl?: typeof fetch }} [options]
|
||||
|
||||
Reference in New Issue
Block a user