An AI coding assistant powered by cloud-based LLMs via OpenRouter — chat, explain, refactor, and fix code directly inside VS Code.
Features
- Chat — conversational AI assistant in the sidebar, with full chat history
- Explain code — select any code and ask RojasCode to explain it
- Refactor code — improve readability, performance, and best practices
- Fix code — find and fix bugs with a single command
- File context — attach the current file or selection to any message
- File attachments — send images, PDFs, Excel files, and source files as context
- Agentic tools — the assistant can read, write, and edit files, run shell commands, search the codebase, and fetch URLs autonomously
- Any model — works with any model available on OpenRouter (Claude, GPT-4o, Llama, Gemini, and more)
Getting Started
1. Get an OpenRouter API key
Sign up at openrouter.ai and create an API key.
2. Configure the extension
Open VS Code settings (Ctrl+,) and search for RojasCode:
| Setting | Description |
|---|---|
rojascode.openrouterToken |
Your OpenRouter API key (sk-or-v1-...) |
rojascode.model |
Model ID to use (default: qwen/qwen3.6-plus:free) |
rojascode.baseUrl |
OpenRouter base URL (default: https://openrouter.ai/api) |
rojascode.maxTokens |
Max tokens in response (0 = model maximum) |
3. Open the chat
Click the RojasCode icon in the Activity Bar, or press Ctrl+Shift+A (Cmd+Shift+A on Mac).
Model Examples
Any model from OpenRouter works. Some popular options:
qwen/qwen3.6-plus:free # Free, good for most tasks
anthropic/claude-sonnet-4-5 # Claude — best for complex reasoning
openai/gpt-4o # GPT-4o
meta-llama/llama-3.3-70b-instruct:free # Free Llama
google/gemini-2.0-flash-001 # Fast Gemini
Context Menu
Right-click any selected code in the editor to access:
- RojasCode: Explain Selected Code
- RojasCode: Refactor Selected Code
- RojasCode: Fix Selected Code
Keyboard Shortcut
| Shortcut | Action |
|---|---|
Ctrl+Shift+A / Cmd+Shift+A |
Open RojasCode chat |
License
MIT © Victor M. Rojas