refactor(opencode-go): localize stream internals (#101440)

This commit is contained in:
Vincent Koc 2026-07-07 00:16:14 -07:00 committed by GitHub
parent d09469c7a6
commit 7c55ce53e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -390,7 +390,7 @@ const OPENCODE_GO_MODELS = (
] satisfies OpencodeGoModelDefinition[]
).map((model) => normalizeModelCompat(model) as OpencodeGoModelDefinition);
export type FetchOpencodeGoLiveModelIdsParams = {
type FetchOpencodeGoLiveModelIdsParams = {
apiKey?: string;
discoveryApiKey?: string;
fetchGuard?: LiveModelCatalogFetchGuard;

View file

@ -7,7 +7,7 @@ import type { ProviderWrapStreamFnContext } from "openclaw/plugin-sdk/plugin-ent
type ProviderStreamFn = NonNullable<ProviderWrapStreamFnContext["streamFn"]>;
export interface OpencodeGoStalledStreamWrapperOptions {
interface OpencodeGoStalledStreamWrapperOptions {
/**
* Provider id this wrapper applies to. Calls whose model.provider does not
* match are forwarded untouched so the wrapper stays provider-scoped.

View file

@ -16,7 +16,7 @@ function isOpencodeGoDeepSeekV4ModelId(modelId: unknown): boolean {
return modelId === "deepseek-v4-flash" || modelId === "deepseek-v4-pro";
}
export function createOpencodeGoDeepSeekV4Wrapper(
function createOpencodeGoDeepSeekV4Wrapper(
baseStreamFn: ProviderWrapStreamFnContext["streamFn"],
thinkingLevel: ProviderWrapStreamFnContext["thinkingLevel"],
): ProviderWrapStreamFnContext["streamFn"] {
@ -32,7 +32,7 @@ function stripReasoningParams(payloadObj: Record<string, unknown>): void {
stripOpencodeGoKimiReasoningPayload(payloadObj);
}
export function createOpencodeGoKimiNoReasoningWrapper(
function createOpencodeGoKimiNoReasoningWrapper(
baseStreamFn: ProviderWrapStreamFnContext["streamFn"],
): ProviderWrapStreamFnContext["streamFn"] {
if (!baseStreamFn) {