Merge remote-tracking branch 'origin/xtr/session-format-migration' into xtr/message-tool-call-id

# Conflicts:
#	.agents/notes/implemented/architecture/2026-06-20-branded-ids.i18n.yaml
#	.agents/notes/implemented/architecture/2026-06-20-branded-ids.md
#	.agents/notes/implemented/architecture/2026-06-20-branded-ids.zh.md
#	packages/fs/tool-fs/tests/read-image.spec.ts
#	packages/llm/llm-deepseek/tests/adapter.e2e.ts
#	packages/llm/llm-deepseek/tests/serialize.spec.ts
#	packages/llm/llm-pi-ai/src/context.ts
#	packages/llm/llm-pi-ai/tests/context.spec.ts
#	packages/llm/llm-pi-ai/tests/convert.spec.ts
#	packages/llm/llm/src/message.ts
#	packages/llm/llm/tests/content.spec.ts
This commit is contained in:
_Kerman
2026-08-22 16:03:48 +08:00
1248 changed files with 29363 additions and 5465 deletions
+12
View File
@@ -675,6 +675,8 @@ interface PreparedLlmCall {
readonly retryPolicy: ResolvedRetryPolicy
/** Detached context metadata resolved with the registration-bound call. */
readonly context?: LlmModelContext
/** Exact model modalities captured with the adapter dispatch generation. */
readonly inputModalities?: readonly ModelModality[]
/** Config fields materialized by the captured adapter rather than proposed by the caller. */
readonly adapterDefaults: LlmCallConfigAdapterDefaults
/**
@@ -730,6 +732,16 @@ declare abstract class LlmAdapter {
model: string,
_signal?: AbortSignal,
): Promise<LlmResolvedModelInfo>;
/**
* Bind exact model metadata and the eventual request dispatch to one adapter generation.
* Dynamic adapters override this so settings changes between preparation and
* dispatch cannot combine one generation's capabilities with another's endpoint.
* @param provider - registered provider route.
* @param model - exact model id.
* @param signal - cancellation for model resolution.
* @returns model metadata and a one-generation stream entry point.
*/
async prepareCall(provider: string, model: string, signal?: AbortSignal): Promise<PreparedAdapterCall>;
/**
* Stream one model call as raw chunks. The only required method.
* @param options - the fully-assembled request; implementations must honor `options.signal`.