Skip to content

Investigate AI SDK attachment failure #2010

@lforst

Description

@lforst
ile part media type text/plain' functionality not supported.\n\nAI_UnsupportedFunctionalityError: 'file part media type text/plain' functionality not supported.\n    at <repo>/e2e/.bt-tmp/scenario-deps/ai-sdk-instrumentation-locked-e712014295b4196e/node_modules/.pnpm/@ai-sdk+openai@3.0.7_zod@3.25.76/node_modules/@ai-sdk/openai/dist/index.mjs:0:0\n    at Array.map (<anonymous>)\n    at convertToOpenAIResponsesInput (<repo>/e2e/.bt-tmp/scenario-deps/ai-sdk-instrumentation-locked-e712014295b4196e/node_modules/.pnpm/@ai-sdk+openai@3.0.7_zod@3.25.76/node_modules/@ai-sdk/openai/dist/index.mjs:0:0)\n    at OpenAIResponsesLanguageModel.getArgs (<repo>/e2e/.bt-tmp/scenario-deps/ai-sdk-instrumentation-locked-e712014295b4196e/node_modules/.pnpm/@ai-sdk+openai@3.0.7_zod@3.25.76/node_modules/@ai-sdk/openai/dist/index.mjs:0:0)\n    at process.processTicksAndRejections (node:<internal>:0:0)\n    at async OpenAIResponsesLanguageModel.doGenerate (<repo>/e2e/.bt-tmp/scenario-deps/ai-sdk-instrumentation-locked-e712014295b4196e/node_modules/.pnpm/@ai-sdk+openai@3.0.7_zod@3.25.76/node_modules/@ai-sdk/openai/dist/index.mjs:0:0)\n    at async parentSpan.traced.name (<repo>/js/dist/index.mjs:0:0)
await instrumentedAI.generateText({
                model: openaiModel,
                messages: [
                  {
                    role: "user",
                    content: [
                      {
                        type: "file",
                        data: Buffer.from("tiny test file", "utf8"),
                        mediaType: "text/plain",
                        filename: "tiny.txt",
                      },
                      {
                        type: "text",
                        text: "Read the file and summarize it in one short sentence.",
                      },
                    ],
                  },
                ],
                temperature: 0,
                ...tokenLimit(options.maxTokensKey, 48),
              });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions