Created
October 12, 2025 02:55
-
-
Save mohemohe/d116737dcebb8f203660210671a17f2b to your computer and use it in GitHub Desktop.
z.aiが /v1/models 相当のエンドポイントを用意してなくてクライアントによっては死ぬので擬似る
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| proxy.zai.mohemohe.jp { | |
| route { | |
| handle /v1/* { | |
| uri replace /v1/ /api/coding/paas/v4/ | |
| } | |
| handle /api/coding/paas/v4/models { | |
| header Content-Type application/json | |
| respond `{ "object": "list", "data": [ | |
| { "id": "glm-4.6", "object": "model", "created": 0, "owned_by": "zai" }, | |
| { "id": "glm-4.5", "object": "model", "created": 0, "owned_by": "zai" }, | |
| { "id": "glm-4.5-air", "object": "model", "created": 0, "owned_by": "zai" }, | |
| { "id": "glm-4.5v", "object": "model", "created": 0, "owned_by": "zai" } | |
| ]}` | |
| } | |
| handle /api/coding/paas/v4/* { | |
| reverse_proxy https://api.z.ai { | |
| header_up Host api.z.ai | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment