Go: implement ASR in ZhipuAI driver (#15134)

### What problem does this PR solve?

This PR implements ASR and TTS support for the ZhipuAI Go driver.

The ZhipuAI model config already advertises `glm-asr-2512` as an ASR
model, but the Go driver returned `zhipu, no such method` from
`TranscribeAudio`. This adds the documented audio transcription endpoint
suffix and sends multipart transcription requests with `model`,
`stream=false`, and `file` fields.

Per maintainer review, this also adds the ZhipuAI TTS endpoint suffix
and implements `AudioSpeech` / `AudioSpeechWithSender` for `glm-tts`.

Closes #15133

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Jake Armstrong
2026-05-21 17:53:18 -10:00
committed by GitHub
parent b2053cc3c7
commit b2bf9155ed
3 changed files with 594 additions and 6 deletions

View File

@@ -9,6 +9,8 @@
"async_result": "async-result",
"embedding": "embeddings",
"rerank": "rerank",
"asr": "audio/transcriptions",
"tts": "audio/speech",
"files": "files",
"models": "models"
},
@@ -268,4 +270,4 @@
]
}
]
}
}