In index.js resolveModel() (lines ~920-945), when bareMatches.length > 1 the function throws an error listing only the first match as an example (bareMatches[0].id), which is helpful. But the preceding providerOverride branch (lines ~925-928) silently returns the first provider-matching model without confirming uniqueness — if two providers expose the same modelID and providerOverride matches both, only the first wins with no warning. More critically, buildSystemPrompt() in index.js (line ~216) appends Requested temperature: X as a plain-text hint to the system prompt rather than passing it as a structured parameter to the underlying model. Temperature and max_tokens are quietly discarded by the actual model call, yet the response shape (e.g. createChatCompletionResponse) reflects the requested values in no way. Callers relying on deterministic (temperature=0) or length-limited responses receive silently incorrect behaviour. The system prompt hints are a best-effort workaround, but this should be documented prominently and a warning logged via safeLog when non-default values are requested.
In
index.jsresolveModel()(lines ~920-945), whenbareMatches.length > 1the function throws an error listing only the first match as an example (bareMatches[0].id), which is helpful. But the precedingproviderOverridebranch (lines ~925-928) silently returns the first provider-matching model without confirming uniqueness — if two providers expose the samemodelIDandproviderOverridematches both, only the first wins with no warning. More critically,buildSystemPrompt()inindex.js(line ~216) appendsRequested temperature: Xas a plain-text hint to the system prompt rather than passing it as a structured parameter to the underlying model. Temperature andmax_tokensare quietly discarded by the actual model call, yet the response shape (e.g.createChatCompletionResponse) reflects the requested values in no way. Callers relying on deterministic (temperature=0) or length-limited responses receive silently incorrect behaviour. The system prompt hints are a best-effort workaround, but this should be documented prominently and a warning logged viasafeLogwhen non-default values are requested.