Addressing PR comments#8
Conversation
This change fixes the error where testing connection would fail if the model crashes when trying to process a minimal chat completion. The /models endpoint is a much lighter connectivity check that: 1. Only verifies the LLM server is reachable (no model execution needed) 2. Lists available models to verify the selected model exists 3. Provides a clearer success/warning message about model availability This resolves the HTTP 400 Bad Request errors that occurred when testing connection with models like deepseek-r1 that may crash with minimal token generation requests. Co-authored-by: raux <5723643+raux@users.noreply.github.com>
Address code review feedback: if the server returns an empty models list, show a warning message instead of assuming the model is available. Co-authored-by: raux <5723643+raux@users.noreply.github.com>
|
@claude[agent] test changes |
There was a problem hiding this comment.
Pull request overview
This PR improves the connection test functionality by replacing the /chat/completions POST endpoint with the /models GET endpoint for connectivity checks. This change avoids model execution crashes that occurred with certain models (e.g., deepseek-r1) when attempting minimal chat completions with low token limits.
Changes:
- Switched from POST
/chat/completionsto GET/modelsfor connection testing - Added model availability verification against the server's reported models list
- Enhanced status messages to indicate whether the specified model is available on the server
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/server.ts | Updated connection test in standalone web server to use /models endpoint with model availability checking |
| src/extension.ts | Updated connection test in VS Code extension to use /models endpoint with model availability checking |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Testing completed successfully! All changes validated: ✓ Linting passed - no code quality issues The connection test changes in both Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.