feat: allow provider-level store option (#8000)

This commit is contained in:
Call White
2026-01-15 14:35:53 +08:00
committed by GitHub
parent 253b7ea784
commit fcf2da9571
2 changed files with 4 additions and 0 deletions

View File

@@ -815,6 +815,7 @@ export namespace Config {
apiKey: z.string().optional(),
baseURL: z.string().optional(),
enterpriseUrl: z.string().optional().describe("GitHub Enterprise URL for copilot authentication"),
store: z.boolean().optional().describe("Set the OpenAI Responses store flag for this provider"),
setCacheKey: z.boolean().optional().describe("Enable promptCacheKey for this provider (default false)"),
timeout: z
.union([

View File

@@ -486,6 +486,9 @@ export namespace ProviderTransform {
if (model.providerID === "openai" || providerOptions?.setCacheKey) {
result["promptCacheKey"] = sessionID
}
if (typeof providerOptions?.store === "boolean") {
result["store"] = providerOptions.store
}
if (model.api.npm === "@ai-sdk/google" || model.api.npm === "@ai-sdk/google-vertex") {
result["thinkingConfig"] = {