fix: identify OpenCode Go requests by session
This commit is contained in:
@@ -102,7 +102,7 @@ const readConfiguredSmallModel = (workingDirectory) => {
|
||||
* Generates text with the user's small model, resolved and authenticated
|
||||
* entirely server-side from the OpenCode config and auth store.
|
||||
*/
|
||||
export async function generateSmallModelText({ prompt, system, maxOutputTokens, model, directory, preferredProviderID, preferredModelID, restrictToPreferredProvider = false, responseSchema, timeoutMs, signal, onOverflow = 'truncate' }) {
|
||||
export async function generateSmallModelText({ prompt, system, maxOutputTokens, model, directory, sessionID, preferredProviderID, preferredModelID, restrictToPreferredProvider = false, responseSchema, timeoutMs, signal, onOverflow = 'truncate' }) {
|
||||
if (typeof prompt !== 'string' || !prompt.trim()) {
|
||||
throw Object.assign(new Error('prompt is required'), { statusCode: 400 });
|
||||
}
|
||||
@@ -169,6 +169,7 @@ export async function generateSmallModelText({ prompt, system, maxOutputTokens,
|
||||
auth,
|
||||
catalog,
|
||||
workingDirectory: directory,
|
||||
sessionID,
|
||||
providerID: resolved.providerID,
|
||||
modelID: resolved.modelID,
|
||||
prompt: clamped.prompt,
|
||||
|
||||
Reference in New Issue
Block a user