Motivation
A public endpoint for listing models would improve the developer experience by allowing applications to discover available models before making authenticated requests, similar to how other AI platforms expose their model catalogs.
Current Behavior
The Puter backend does not expose any public (unauthenticated) endpoints for querying available AI chat models. While the AIChatService maintains lists of available models internally, these are only accessible through authenticated driver interfaces.
Reproduction Steps:
- Start the Puter backend server
- Attempt to make an unauthenticated GET request to
/puterai/chat/models (Hint: use curl in your terminal)
- Observe: The endpoint does not exist (404 Not Found)
- Review the codebase for any public endpoints that list AI models
- Observe: No such endpoints exist in the current implementation
Expected Behavior
The system should provide public, unauthenticated REST API endpoints that allow anyone to query the available AI chat models. There should be two endpoints: one for a simple list of models, and another for detailed model information including capabilities and cost data.
Acceptance Criteria:
Steps To Test
- Start the Puter backend server in development mode
- Make an unauthenticated GET request to
http://localhost:4100/puterai/chat/models
- Verify the response contains a JSON object with a
models array listing available AI models
- Make an unauthenticated GET request to
http://localhost:4100/puterai/chat/models/details
- Verify the response contains detailed model information including cost and capability data
- Run the test suite and verify all new tests pass
Submission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx
Motivation
A public endpoint for listing models would improve the developer experience by allowing applications to discover available models before making authenticated requests, similar to how other AI platforms expose their model catalogs.
Current Behavior
The Puter backend does not expose any public (unauthenticated) endpoints for querying available AI chat models. While the
AIChatServicemaintains lists of available models internally, these are only accessible through authenticated driver interfaces.Reproduction Steps:
/puterai/chat/models(Hint: use curl in your terminal)Expected Behavior
The system should provide public, unauthenticated REST API endpoints that allow anyone to query the available AI chat models. There should be two endpoints: one for a simple list of models, and another for detailed model information including capabilities and cost data.
Acceptance Criteria:
/puterai/chat/modelsreturns a simple list of available AI models without requiring authentication/puterai/chat/models/detailsreturns detailed information about available models including cost and capability dataSteps To Test
http://localhost:4100/puterai/chat/modelsmodelsarray listing available AI modelshttp://localhost:4100/puterai/chat/models/detailsSubmission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx