fix(subagent): bind preflight to provider route defaults

This commit is contained in:
pku-xht committed 2026-08-24 21:38:28 +08:00
1 parent 3c79979d1d
commit 096ae14db2
23 files changed
+198 -84

No files matched your search

@@ -1,4 +1,5 @@
import type { Context } from '@deepseek-ai/cordis'
import { appendFileSync } from 'node:fs'
import type { GenerateOptions, LlmResolvedModelInfo, StreamChunk } from '@deepseek-ai/dsh-llm'
import { CallId, LlmAdapter, ReasoningEffortId } from '@deepseek-ai/dsh-llm'
@@ -10,6 +11,9 @@ import { CallId, LlmAdapter, ReasoningEffortId } from '@deepseek-ai/dsh-llm'
*/
class MockDelegatingAdapter extends LlmAdapter {
override resolveModel(provider: string, model: string): Promise<LlmResolvedModelInfo> {
if (process.env.DSH_TEST_PARENT_MODEL_RECORD !== undefined) {
appendFileSync(process.env.DSH_TEST_PARENT_MODEL_RECORD, `${provider}/${model}\n`)
}
return Promise.resolve({
provider,
id: model,