Jack
35527f6755
fix: guard http.DefaultTransport type assertion in xiaomi for Go 1.25 ( #15787 )
...
## Problem
`TestXiaomiNewModelWithCustomDefaultTransport` panics on Go 1.25:
```
panic: interface conversion: http.RoundTripper is models.roundTripperFunc, not *http.Transport
```
In Go 1.25, `http.DefaultTransport` is no longer `*http.Transport`, so
the unchecked type assertion in `NewXiaomiModel` panics when the test
replaces it with a `roundTripperFunc`.
## Fix
Use a safe type assertion with fallback to a new `http.Transport`,
matching the pattern already used in `modelscope.go`.
## Verification
```bash
go test -run TestXiaomiNewModelWithCustomDefaultTransport ./internal/entity/models/...
# PASS
```
Internal contributors only.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-08 21:11:21 +08:00
..
2026-05-28 13:33:01 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-05-18 12:03:33 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 20:06:57 +08:00
2026-06-04 17:50:22 +08:00
2026-05-21 15:32:49 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 20:06:57 +08:00
2026-06-05 13:26:32 +08:00
2026-06-05 13:26:32 +08:00
2026-06-08 11:49:37 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 19:32:19 +08:00
2026-06-08 19:32:19 +08:00
2026-05-26 10:52:09 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 13:09:36 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 20:06:57 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 20:06:57 +08:00
2026-06-08 20:06:57 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 20:06:57 +08:00
2026-06-04 17:50:22 +08:00
2026-05-29 10:09:27 +08:00
2026-06-08 13:10:10 +08:00
2026-05-18 12:03:12 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 20:06:57 +08:00
2026-06-08 20:06:57 +08:00
2026-06-08 20:06:57 +08:00
2026-05-29 19:34:00 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 20:06:57 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 19:32:01 +08:00
2026-06-08 19:32:01 +08:00
2026-06-03 19:16:28 +08:00
2026-06-04 17:50:22 +08:00
2026-06-03 19:16:28 +08:00
2026-06-08 20:06:57 +08:00
2026-06-08 20:06:57 +08:00
2026-06-08 19:27:19 +08:00
2026-06-08 19:27:19 +08:00
2026-06-02 13:40:10 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 20:06:57 +08:00
2026-06-04 17:50:22 +08:00
2026-05-11 17:21:16 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 20:06:57 +08:00
2026-05-25 10:25:53 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 20:06:57 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 20:06:57 +08:00
2026-05-21 15:33:02 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 13:32:52 +08:00
2026-06-08 20:06:57 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 13:32:52 +08:00
2026-06-08 13:10:10 +08:00
2026-06-04 17:50:22 +08:00
2026-06-02 15:27:26 +08:00
2026-06-08 20:06:57 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 20:06:57 +08:00
2026-06-04 17:50:22 +08:00
2026-05-22 15:21:45 +08:00
2026-06-04 17:50:22 +08:00
2026-06-03 13:23:20 +08:00
2026-05-21 15:33:21 +08:00
2026-06-04 17:50:22 +08:00
2026-05-15 13:27:22 +08:00
2026-06-08 20:06:57 +08:00
2026-05-27 13:14:56 +08:00
2026-06-04 17:50:22 +08:00
2026-05-29 19:34:00 +08:00
2026-06-04 17:50:22 +08:00
2026-05-26 19:58:20 +08:00
2026-06-04 17:50:22 +08:00
2026-06-08 21:11:21 +08:00
2026-06-08 21:11:21 +08:00
2026-06-08 20:06:57 +08:00
2026-06-08 20:06:57 +08:00
2026-06-03 19:16:28 +08:00
2026-06-04 17:50:22 +08:00
2026-05-22 11:53:18 +08:00
2026-05-26 10:50:06 +08:00
2026-06-04 17:50:22 +08:00