chore: generate
This commit is contained in:
@@ -195,9 +195,9 @@ export namespace ProviderTransform {
|
|||||||
|
|
||||||
for (const msg of unique([...system, ...final])) {
|
for (const msg of unique([...system, ...final])) {
|
||||||
const useMessageLevelOptions =
|
const useMessageLevelOptions =
|
||||||
model.providerID === "anthropic" ||
|
model.providerID === "anthropic" ||
|
||||||
model.providerID.includes("bedrock") ||
|
model.providerID.includes("bedrock") ||
|
||||||
model.api.npm === "@ai-sdk/amazon-bedrock"
|
model.api.npm === "@ai-sdk/amazon-bedrock"
|
||||||
const shouldUseContentOptions = !useMessageLevelOptions && Array.isArray(msg.content) && msg.content.length > 0
|
const shouldUseContentOptions = !useMessageLevelOptions && Array.isArray(msg.content) && msg.content.length > 0
|
||||||
|
|
||||||
if (shouldUseContentOptions) {
|
if (shouldUseContentOptions) {
|
||||||
|
|||||||
@@ -1657,7 +1657,7 @@ describe("ProviderTransform.message - bedrock caching with non-bedrock providerI
|
|||||||
] as any[]
|
] as any[]
|
||||||
|
|
||||||
const result = ProviderTransform.message(msgs, model, {}) as any[]
|
const result = ProviderTransform.message(msgs, model, {}) as any[]
|
||||||
|
|
||||||
// Cache should be at the message level and not the content-part level
|
// Cache should be at the message level and not the content-part level
|
||||||
expect(result[0].providerOptions?.bedrock).toEqual({
|
expect(result[0].providerOptions?.bedrock).toEqual({
|
||||||
cachePoint: { type: "default" },
|
cachePoint: { type: "default" },
|
||||||
|
|||||||
Reference in New Issue
Block a user