mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 15:59:30 +00:00
refactor(opencode-go): localize stream internals (#101440)
This commit is contained in:
parent
d09469c7a6
commit
7c55ce53e2
3 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue