#1217·gateway

Audio transcription endpoint does not respect Gateway's override_params

Author: AgileEduLabsCreated Jul 7, 2025Updated Sep 24, 2026
Labelsbugtriage

What Happened?

With portkey.chat.completions.create, we can provide override_params to the gateway to specify which model to use. The model parameter in portkey.chat.completions.create itself can be omitted since we specify it in the gateway.

However, with portkey.audio.transcriptions.create, there are two issues.

First, it forces us to specify the model. Otherwise it will cause an error:

portkey.audio.transcriptions.create({
          model: '', // <--- Model parameter must be specified. If omitted, it will cause an error
          file: fs.createReadStream(fileName),
          response_format: 'text',
        }, requestOptionsForTranscription);

Second, even more problematic, portkey.audio.transcriptions.create does not respect the override_params of the gateway config object. In the snipped I have included below, we would expect it to use distil-whisper-large-v3-en as specified in the config object. However, this value is ignored and instead portkey uses the non-existent should-use-model-name-from-gateway value.

What Should Have Happened?

No response

Relevant Code Snippet

    const portkeyGatewayConfigForTranscription = {
      "strategy": {
        "mode": "loadbalance"
      },
      "targets": [
        {
          "strategy": {
            "mode": "fallback"
          },
          "targets": [
            {
              "provider": "groq",
              "api_key": "gsk_",
              "override_params": {
                "model": "distil-whisper-large-v3-en"
              }
            },
          ]
        },
        {
          "strategy": {
            "mode": "fallback"
          },
          "targets": [
            {
              "provider": "groq",
              "api_key": "gsk_",
              "override_params": {
                "model": "distil-whisper-large-v3-en"
              }
            },
          ]
        }
      ]
    }

    const requestOptionsForTranscription = {
      metadata: {
      },
      config: JSON.stringify(portkeyGatewayConfigForTranscription),
    }
    let transcript = await portkey.audio.transcriptions.create({
      model: 'should-use-model-name-from-gateway',
      file: fs.createReadStream(fileName),
      response_format: 'text',
    }, requestOptionsForTranscription);

Your Twitter/LinkedIn

No response