← All documentation

Setup Extension with AskCodi API

Quick guide to connect Continue.dev with AskCodi API. Configure API keys, YAML settings, and OpenAI-compatible integration for Chat, Autocomplete, Edit, and Agent modes.

Setup takes 5 minutes. Configure Continue.dev to use AskCodi's API with OpenAI-compatible settings.

Get Your AskCodi API Key

  1. Sign up at AskCodi.com
  2. Go to API key dashboard
  3. Create new API key for Continue.dev
  4. Copy key to secure location

Keep your API key private. Anyone with your key can make requests through your account. Store in environment variables, not config files.

Install Continue.dev Extension

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "Continue"
  4. Install the official Continue extension

Continue.dev works with VS Code and JetBrains IDEs. Restart VS Code after installation.

Find Your Config File

Continue.dev stores config in YAML format. Locations:

Mac/Linux: ~/.continue/config.json or ~/.continue/continue_config.yaml Windows: %USERPROFILE%\.continue\config.json

Use VS Code command palette (Ctrl+Shift+P). Type "Continue: Open Config" to open the file directly.

Add AskCodi Model Config

Open your Continue config file in VS Code. Add this model definition:

models:
  - name: "askcodi-model"
    provider: "openai"
    model: "askcodi-model"
    apiBase: https://api.askcodi.com/v1
    apiKey: ${ASKCODI_API_KEY}

This connects Continue.dev to AskCodi. Replace model name with your preferred model. The provider uses OpenAI-compatible API.

Include all model roles: chat, edit, autocomplete, agent. This gives you access to all Continue.dev features with AskCodi.

Set Environment Variable

Create an environment variable to store your API key.

Mac/Linux: Add to your shell config (.bashrc, .zshrc, etc.):

export ASKCODI_API_KEY="your-actual-api-key-here"

Windows:

  1. Search "Environment Variables" in Start menu
  2. Add system variable named ASKCODI_API_KEY
  3. Set value to your API key

Restart your terminal and VS Code. This ensures Continue.dev can access the API key.

Restart Continue.dev

  1. Open VS Code command palette (Ctrl+Shift+P)
  2. Type "Continue: Reset"
  3. Execute the command

This reloads your config and applies changes. The "AskCodi" model now appears in the dropdown next to chat input.

Test the Integration

  1. Open any project file in VS Code
  2. Select code lines
  3. Use Continue.dev chat with AskCodi model
  4. Test all modes: chat, edit, autocomplete, agent

Check Continue.dev logs if issues appear. Open VS Code Output panel and select "Continue" from dropdown.

Multiple Models (Optional)

Use different models for different tasks. Add more entries to the models array:

models:
  - title: "AskCodi - Fast"
    provider: "openai"
    model: "gpt-4o-mini"
    providerParams:
      apiKey: ${ASKCODI_API_KEY}
      baseURL: https://api.askcodi.com/v1
    contextSizing:
      maxContextTokens: 128000
      recommendedRequestTokens: 120000
    modelRoles: [autocomplete, chat]
  - title: "AskCodi - Smart"
    provider: "openai"
    model: "gpt-4o"
    providerParams:
      apiKey: ${ASKCODI_API_KEY}
      baseURL: https://api.askcodi.com/v1
    contextSizing:
      maxContextTokens: 128000
      recommendedRequestTokens: 120000
    modelRoles: [edit, agent]

This uses fast models for autocomplete and chat. It runs smarter models for edit and agent tasks.

Token Usage Tips

Use 128000 max tokens to start. Large windows give better context but cost more.

contextSizing:
  maxContextTokens: 128000
  recommendedRequestTokens: 120000

Monitor usage on AskCodi dashboard. Adjust token sizes based on your tasks.

Troubleshooting

API Key Not Recognized:

  • Check environment variable name matches config reference
  • Confirm you restarted VS Code after setting variable

Connection Errors:

  • Verify base URL: https://api.askcodi.com/v1
  • Check your API key status in AskCodi account

Model Not Appearing:

  • Validate YAML syntax in your config file
  • Ensure file is saved in correct location

Key Steps

  • Store API keys in environment variables
  • Use OpenAI provider with AskCodi base URL
  • Include all model roles for full functionality
  • Test all Continue.dev modes
  • Monitor token usage on AskCodi dashboard

Something missing or wrong in this guide? Talk to us