MCPcopy
hub / github.com/steipete/oracle / resolveApiModel

Function resolveApiModel

src/cli/options.ts:104–115  ·  view source on GitHub ↗
(modelValue: string)

Source from the content-addressed store, hash-verified

102}
103
104export function resolveApiModel(modelValue: string): ModelName {
105 const normalized = normalizeModelOption(modelValue).toLowerCase();
106 if (normalized in MODEL_CONFIGS) {
107 return normalized as ModelName;
108 }
109 if (normalized.includes('gemini')) {
110 return 'gemini-3-pro';
111 }
112 throw new InvalidArgumentError(
113 `Unsupported model "${modelValue}". Choose one of: ${Object.keys(MODEL_CONFIGS).join(', ')}`,
114 );
115}
116
117export function inferModelFromLabel(modelValue: string): ModelName {
118 const normalized = normalizeModelOption(modelValue).toLowerCase();

Callers 3

options.test.tsFile · 0.90
runRootCommandFunction · 0.85

Calls 1

normalizeModelOptionFunction · 0.85

Tested by

no test coverage detected