Files
new-api/middleware
t0ng7u d0589468c1 feat(middleware): enhance Kling request adapter to support both 'model' and 'model_name' fields
Previously, the KlingRequestConvert middleware only extracted model name from
the 'model_name' field, which caused 503 errors when requests used the 'model'
field instead. This enhancement improves API compatibility by supporting both
field names.

Changes:
- Modified KlingRequestConvert() to check for 'model' field if 'model_name' is empty
- Maintains backward compatibility with existing 'model_name' usage
- Fixes "no available channels for model" error when model field was not recognized

This resolves issues where valid Kling API requests were failing due to field
name mismatches, improving the overall user experience for video generation APIs.
2025-07-22 00:06:29 +08:00
..
2025-07-17 22:26:38 +08:00
2023-05-22 00:54:53 +08:00
2023-06-20 22:04:01 +08:00
2024-12-04 23:53:02 +08:00
2024-01-07 22:25:03 +08:00
2023-04-22 21:14:09 +08:00
2024-07-27 17:55:36 +08:00