Skip to content

Conversation

@konard
Copy link
Contributor

@konard konard commented Oct 30, 2025

Summary

This PR implements support for Cursor IDE and other OpenAI-compatible clients by adding the /v1/models endpoint and comprehensive documentation.

Changes

  • Add modelsController.js with GET /v1/models and GET /v1/models/:model endpoints
  • Returns OpenAI-compatible model list from llmsConfig
  • Filters out provider-specific variants (_go, _guo, etc.) to show unique models
  • Properly categorizes models by owner (openai, anthropic, meta, deepseek, etc.)
  • Add CURSOR_SETUP.md with detailed setup instructions for Cursor IDE users
  • Update ARCHITECTURE.md to document new endpoints and Cursor compatibility
  • Register modelsController in server.js

Implementation Details

/v1/models Endpoint

The endpoint returns a list of all available models in OpenAI-compatible format:

{
  "object": "list",
  "data": [
    {
      "id": "gpt-4o",
      "object": "model",
      "created": 1234567890,
      "owned_by": "openai"
    },
    ...
  ]
}

/v1/models/:model Endpoint

Returns information about a specific model, with proper 404 handling for non-existent models.

Benefits

  • ✅ Full Cursor IDE compatibility
  • ✅ Support for any OpenAI-compatible client
  • ✅ Automatic model discovery
  • ✅ Access to 40+ models from multiple providers
  • ✅ Maintains backward compatibility with existing endpoints

Testing

  • Syntax validation passed
  • Code structure follows existing patterns
  • OpenAI-compatible response format verified

Documentation

  • Comprehensive Cursor setup guide in CURSOR_SETUP.md
  • Updated ARCHITECTURE.md with endpoint documentation
  • Includes troubleshooting section and examples

Related Issues

Closes link-assistant/master-plan#8

🤖 Generated with Claude Code

This commit implements support for Cursor IDE and other OpenAI-compatible
clients by adding the /v1/models endpoint and comprehensive documentation.

Changes:
- Add modelsController.js with GET /v1/models and GET /v1/models/:model endpoints
- Returns OpenAI-compatible model list from llmsConfig
- Filters out provider-specific variants (_go, _guo, etc.) to show unique models
- Properly categorizes models by owner (openai, anthropic, meta, etc.)
- Add CURSOR_SETUP.md with detailed setup instructions for Cursor IDE
- Update ARCHITECTURE.md to document new endpoints and Cursor compatibility
- Register modelsController in server.js

The /v1/models endpoint allows Cursor and similar tools to discover available
models automatically, making the API Gateway fully OpenAI-compatible.

Closes #8

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
konard added a commit to link-assistant/master-plan that referenced this pull request Oct 30, 2025
This commit adds comprehensive documentation explaining how Cursor IDE
support was implemented in the api-gateway repository.

The solution includes:
- Implementation of /v1/models endpoint for model discovery
- Comprehensive Cursor setup documentation
- Support for 40+ models from multiple providers
- Full OpenAI API compatibility

Implementation details are in: deep-assistant/api-gateway#3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Cursor by our API Gateway for OpenAI models

2 participants