AFFiNE icon indicating copy to clipboard operation
AFFiNE copied to clipboard

[Bug]: copilot_prompt_invalid: Model gpt-4o-mini-audio-preview does not support structured output

Open LastSkywalkerER opened this issue 1 month ago • 3 comments

What happened?

I don't quite understand what gpt-4o-mini-audio-preview is and where it could have come from when I try to transcribe audio.

Even inside the container, there is no mention of this model in the ./dist/main.js file.

Image

Distribution version

Web (https://app.affine.pro)

App Version

0.25.6

What browsers are you seeing the problem on if you're using web version?

Chrome

Are you self-hosting?

  • [x] Yes

Self-hosting Version

0.25.6

Relevant log output

[Nest] 1  - 12/01/2025, 9:36:35 AM   ERROR [job] <selfhosted:graphql:77e86647-fed5-442a-8f61-0c0f7c62b827> Job failed: [copilot.transcript.submit] (CopilotTranscriptionService.transcriptAudio, id=10)
copilot_prompt_invalid: Model gpt-4o-mini-audio-preview does not support structured output with <any> input
    at GeminiGenerativeProvider.selectModel (file:///app/dist/main.js:120333:15)
    at GeminiGenerativeProvider.checkParams (file:///app/dist/main.js:120446:28)
    at GeminiGenerativeProvider.structure (file:///app/dist/main.js:122897:20)
    at CopilotTranscriptionService.chatWithPrompt (file:///app/dist/main.js:133544:29)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async CopilotTranscriptionService.callTranscript (file:///app/dist/main.js:133570:24)
    at async Promise.all (index 0)
    at async CopilotTranscriptionService.transcriptAudio (file:///app/dist/main.js:133588:36)
    at async fn.job (file:///app/dist/main.js:8281:29)
    at async file:///app/dist/main.js:6374:20

Anything else?

Here is the config from admin

{"scenarios":{"chat":"gpt-5-mini","image":"gpt-image-1","coding":"gpt-5.1-codex","rerank":"gpt-4.1","embedding":"text-embedding-3-small","audio_transcribing":"gemini-2.0-flash","polish_and_summarize":"gpt-5-mini","quick_decision_making":"gpt-5-mini","quick_text_generation":"gpt-4o-mini","complex_text_generation":"gpt-5-mini"},"override_enabled":true}

This is how I start the server.

services:
    affine:
        cpu_shares: 90
        container_name: affine_server
        depends_on:
            postgres:
                condition: service_healthy
                required: true
            redis:
                condition: service_healthy
                required: true
        deploy:
            resources:
                limits:
                    memory: "16744710144"
        environment:
            AFFINE_CONFIG_PATH: /root/.affine/config
            AFFINE_SERVER_EXTERNAL_URL: https://affine.sky-tehnol.uk
            AFFINE_SERVER_HOST: https://affine.sky-tehnol.uk
            AFFINE_SERVER_HTTPS: "false"
            COPILOT_OPENAI_API_KEY: ...
            DATABASE_URL: ...
            MAILER_HOST: ...
            MAILER_PASSWORD: ...
            MAILER_PORT: "465"
            MAILER_SENDER: SkyAffine Team <[email protected]>
            MAILER_USER: resend
              #  NODE_OPTIONS: --import=./scripts/register.js
            REDIS_SERVER_HOST: redis
            AFFINE_INDEXER_ENABLED: "false"
        hostname: affine_server
        healthcheck:
            test:
                - CMD-SHELL
                - bash -c ':> /dev/tcp/127.0.0.1/3010' || exit 1
            timeout: 20s
            interval: 5s
            retries: 3
        image: ghcr.io/toeverything/affine:stable
        labels:
            icon: https://app.affine.pro/api/workspaces/qf73AF6vzWphbTJdN7KiX/blobs/zaFAx1uVZi_n4TTnQtMo2zC1JgPOBZnYf2BxYVInhc0=
        networks:
            default: null
        ports:
            - mode: ingress
              target: 3010
              published: "3010"
              protocol: tcp
        restart: unless-stopped
        volumes:
            - type: bind
              source: /DATA/AppData/affine/storage
              target: /root/.affine/storage
              bind:
                create_host_path: true
            - type: bind
              source: /DATA/AppData/affine/config
              target: /root/.affine/config
              bind:
                create_host_path: true

LastSkywalkerER avatar Dec 01 '25 10:12 LastSkywalkerER

Issue Status: 🆕 *Untriaged

*🆕 Untriaged

The team has not yet reviewed the issue. We usually do it within one business day. Docs: https://github.com/toeverything/AFFiNE/blob/canary/docs/issue-triaging.md

This is an automatic reply by the bot.

affine-issue-bot[bot] avatar Dec 01 '25 10:12 affine-issue-bot[bot]

Currently the transcript feature only supports the Gemini 2.5 and Gemini 3 series models, please check whether you have a key to configure gemini.

darkskygit avatar Dec 05 '25 06:12 darkskygit

Currently the transcript feature only supports the Gemini 2.5 and Gemini 3 series models, please check whether you have a key to configure gemini.

I changed the model in the config

{"scenarios":{"chat":"gpt-5-mini","image":"gpt-image-1","coding":"gpt-5.1-codex","rerank":"gpt-4.1","embedding":"text-embedding-3-small","audio_transcribing":"gemini-2.5-flash-lite","polish_and_summarize":"gpt-5-mini","quick_decision_making":"gpt-5-mini","quick_text_generation":"gpt-4o-mini","complex_text_generation":"gpt-5-mini"},"override_enabled":true}

and I have the gemini key set

Image

but the transcription error has not changed

LastSkywalkerER avatar Dec 05 '25 08:12 LastSkywalkerER