fix: MiMo ASR 认证头改为 Authorization: Bearer

MiMo API 使用标准 Bearer Token 认证,而非自定义 api-key 头。
This commit is contained in:
hhs
2026-06-13 21:57:56 +08:00
parent 420871cd7e
commit 322061c387
2 changed files with 3 additions and 3 deletions

View File

@@ -21,8 +21,8 @@ func newTestMiMoService(handler http.HandlerFunc) (*MiMoService, *httptest.Serve
func TestMiMoService_Recognize_Success(t *testing.T) {
s, srv := newTestMiMoService(func(w http.ResponseWriter, r *http.Request) {
// 验证请求
if r.Header.Get("api-key") != "test-key" {
t.Errorf("expected api-key test-key, got %s", r.Header.Get("api-key"))
if r.Header.Get("Authorization") != "Bearer test-key" {
t.Errorf("expected Authorization Bearer test-key, got %s", r.Header.Get("Authorization"))
}
if r.URL.Path != "/chat/completions" {
t.Errorf("expected path /chat/completions, got %s", r.URL.Path)