MoonshotAI / MoonshotAI/kimi-code
[Feat] 请支持第三方NewAPI端点添加,现在报错Error: Failed to import registry: Invalid URL (GET /v1)
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
What feature would you like to see?
[Feat] 请支持第三方平台端点(例如NewAPI平台)的添加,现在按如下格式在/provider命令下手动添加 Provider会报错:
Add provider
↑↓ navigate · Enter select · Esc cancel
Known third-party provider
❯ Custom registry (api.json)
报错1如下:
http://192.168.2.197:3000/
Error: Failed to import registry: Unexpected token '<', "<!doctype "... is not valid JSON
报错2如下:
http://192.168.2.197:3000/v1
Error: Failed to import registry: Invalid URL (GET /v1)
希望能仅通过base url完成API端点的添加。
Additional information
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the /provider command flow and the code that imports a custom registry from the supplied endpoint. Reproduce the two reported cases using a base URL, then trace how the URL is validated and how registry responses are parsed. Done means a compatible third-party endpoint can be added using only its base URL without either reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100