TL;DR

Continue.dev is a free, open-source AI coding assistant that runs directly in VS Code and supports multiple LLM providers including Claude, GPT-4, Gemini, and local models like Ollama. Unlike subscription-based tools, you bring your own API keys and pay only for what you use—making it ideal for developers who want flexibility without recurring costs.

Key advantages: Works with 20+ LLM providers, supports custom model configurations, includes context-aware code completion, and offers chat-based refactoring. You can switch between Claude 3.5 Sonnet for complex architecture decisions and GPT-4o for rapid prototyping, or run Llama 3.1 locally for sensitive codebases.

Quick setup: Install the Continue extension from VS Code marketplace, add your API keys to ~/.continue/config.json, and start coding. The entire process takes under 5 minutes. You can configure multiple models simultaneously—use Claude for Terraform infrastructure reviews, GPT-4 for Python debugging, and Codestral for autocomplete.

Real-world workflow: Highlight a Kubernetes manifest, press Cmd+L (Mac) or Ctrl+L (Windows/Linux), and ask “Add resource limits and health checks.” Continue analyzes your existing patterns and generates production-ready YAML. For Ansible playbooks, it suggests idempotent tasks based on your inventory structure. When debugging Prometheus queries, it explains PromQL syntax and suggests optimizations.

Critical warning: Always validate AI-generated system commands before execution. Continue might suggest rm -rf operations, database migrations, or infrastructure changes that could cause data loss. Review Terraform plans, test Ansible playbooks in staging, and verify Docker commands before running in production environments.

This guide covers installation, API key configuration, model selection strategies, context management, and productivity workflows. You’ll learn how to integrate Continue with your existing development tools and maximize AI assistance while maintaining code quality and security standards.

What is Continue.dev and Why It Matters in 2026

Continue.dev is an open-source AI coding assistant that runs directly inside VS Code and JetBrains IDEs, giving you ChatGPT-like capabilities without leaving your editor. Unlike proprietary tools like GitHub Copilot or Cursor, Continue.dev lets you connect to any LLM provider—OpenAI, Anthropic Claude, local Ollama models, or even your company’s self-hosted AI infrastructure.

In 2026, Continue.dev has become the go-to choice for developers who need flexibility. You can switch between Claude 3.5 Sonnet for complex refactoring tasks and GPT-4 for documentation generation, all within the same session. For teams working with infrastructure-as-code tools like Terraform or Ansible, this means you can use specialized models trained on DevOps patterns while keeping sensitive configuration files on-premises.

Cost control: Instead of paying $10-20/month per seat for Copilot, you can use Continue.dev with your existing OpenAI API credits or free local models like CodeLlama through Ollama.

Privacy-first architecture: When working with Kubernetes manifests, Prometheus alerting rules, or database migration scripts, you control where your code is sent. Configure Continue.dev to use local models for sensitive work:

models:
  - title: "Local CodeLlama"
    provider: "ollama"
    model: "codellama:13b"

Real-world integration: Continue.dev excels at context-aware suggestions. When editing a Python Flask application, it can reference your existing requirements.txt, suggest compatible library versions, and generate test cases using pytest patterns already in your codebase.

⚠️ Caution: Always review AI-generated system commands before execution. When Continue.dev suggests terraform apply or kubectl delete, validate the resources being modified. AI models can hallucinate incorrect flags or target wrong environments—especially critical when working with production infrastructure.

Model Options: Local vs Cloud APIs

Continue.dev’s flexibility shines in its model configuration options. You can choose between cloud-based APIs for maximum capability or local models for privacy and cost control.

For cloud models, Continue.dev supports OpenAI, Anthropic, Google, and others. Add your API key to ~/.continue/config.json:

{
  "models": [
    {
      "title": "Claude 3.5 Sonnet",
      "provider": "anthropic",
      "model": "claude-3-5-sonnet-20241022",
      "apiKey": "sk-ant-api03-..."
    },
    {
      "title": "GPT-4",
      "provider": "openai",
      "model": "gpt-4-turbo-preview",
      "apiKey": "sk-proj-..."
    }
  ]
}

Cloud models excel at complex refactoring, generating Terraform modules, or writing comprehensive test suites. However, they incur per-token costs and send your code to external servers.

Local Model Setup

For sensitive codebases or offline work, run models locally via Ollama:

# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh

# Pull a coding model
ollama pull deepseek-coder:6.7b
ollama pull codellama:13b

Configure Continue.dev to use your local model:

{
  "models": [
    {
      "title": "DeepSeek Coder",
      "provider": "ollama",
      "model": "deepseek-coder:6.7b"
    }
  ]
}

Local models work well for code completion, simple refactoring, and generating boilerplate Ansible playbooks or Prometheus alert rules. They’re free after initial setup but require GPU resources for acceptable performance.

⚠️ Critical Warning: AI models frequently hallucinate when generating system commands. Always review generated Kubernetes manifests, database migrations, or infrastructure-as-code before applying. A hallucinated kubectl delete or terraform destroy command can cause production outages. Test AI-generated Ansible playbooks in staging environments first—never run them directly on production servers.

Core Features: Chat, Autocomplete, and Context Management

Continue.dev provides three primary interaction modes that work together to accelerate your development workflow.

The sidebar chat panel (Cmd/Ctrl+L) functions as your AI pair programmer. You can ask questions about your codebase, request refactoring suggestions, or generate new code. The chat maintains conversation context, allowing follow-up questions without repeating yourself.

# Ask: "Add error handling to this function"
def deploy_terraform(config_path):
    subprocess.run(['terraform', 'apply', '-auto-approve'])

The AI will suggest try-except blocks, logging, and rollback strategies based on your project’s existing patterns.

Autocomplete

Inline suggestions appear as you type, predicting entire functions or code blocks. Continue.dev analyzes your current file and related imports to provide contextually relevant completions. Unlike basic autocomplete, it understands multi-line patterns:

# Type "- name: Install" and Continue suggests:
- name: Install Prometheus
  apt:
    name: prometheus
    state: present
  notify: restart prometheus

Caution: Always review AI-generated system commands, especially Ansible tasks or Terraform resources that modify infrastructure. Validate against your organization’s security policies before applying changes to production environments.

Context Management

Continue.dev’s context engine determines which files inform AI responses. Use @filename to explicitly include files, or let the automatic context detection analyze imports and recently edited files. For infrastructure code, reference your variable files:

# In chat: "@variables.tf @main.tf How do I add a new EC2 instance?"

The AI considers both files when generating Terraform configurations, ensuring consistency with your existing naming conventions and tagging strategies.

Best Practice: When working with configuration management tools like Ansible or Kubernetes manifests, always test AI-generated configurations in staging environments first. AI models can hallucinate deprecated API versions or incorrect resource specifications.

Installation and Configuration

Open VS Code and navigate to the Extensions marketplace (Ctrl+Shift+X). Search for “Continue” and click Install on the official Continue extension. The extension activates immediately—you’ll see the Continue icon in your left sidebar.

Connecting Your AI Provider

Click the Continue icon to open the sidebar, then select the gear icon for settings. Continue supports multiple providers including OpenAI, Anthropic Claude, Ollama for local models, and OpenRouter for accessing various APIs through one endpoint.

For Claude integration, add your Anthropic API key:

{
  "models": [
    {
      "title": "Claude 3.5 Sonnet",
      "provider": "anthropic",
      "model": "claude-3-5-sonnet-20241022",
      "apiKey": "sk-ant-api03-..."
    }
  ]
}

For local development with Ollama, install Ollama first, then configure:

{
  "models": [
    {
      "title": "Codestral Local",
      "provider": "ollama",
      "model": "codestral:latest"
    }
  ]
}

Context Configuration

Continue automatically indexes your workspace, but you can customize which files to include. Create a .continueignore file in your project root:

node_modules/
*.log
.env
dist/
terraform.tfstate
ansible/vault.yml

⚠️ Critical: AI Hallucination Risks

AI models can generate plausible-looking but incorrect infrastructure commands. Always validate generated Terraform plans, Ansible playbooks, and Kubernetes manifests in staging environments first. Never run AI-suggested kubectl delete, terraform destroy, or database migration commands directly in production without manual review.

For Prometheus configuration or Grafana dashboards, verify metric names and query syntax against your actual telemetry data before deploying.

Real-World Workflow Examples

When your Flask endpoint returns 500 errors, highlight the problematic route and ask Continue: “Why is this endpoint failing with database connection errors?” Continue analyzes your SQLAlchemy models, identifies missing connection pool settings, and suggests adding SQLALCHEMY_POOL_RECYCLE = 3600 to your config.

# Continue suggests this fix after analyzing your models
app.config['SQLALCHEMY_POOL_RECYCLE'] = 3600
app.config['SQLALCHEMY_POOL_PRE_PING'] = True

Writing Terraform Infrastructure Code

Select your existing AWS VPC module and prompt: “Add an RDS PostgreSQL instance with read replicas in us-east-1.” Continue generates the resource blocks with proper security group references and subnet configurations. It pulls context from your existing variables.tf to match your naming conventions.

resource "aws_db_instance" "postgres_primary" {
  identifier           = "${var.environment}-postgres"
  engine              = "postgres"
  engine_version      = "15.4"
  instance_class      = "db.t3.medium"
  allocated_storage   = 100
  db_subnet_group_name = aws_db_subnet_group.main.name
}

⚠️ Validation Warning: Always review AI-generated Terraform before applying. Continue may hallucinate resource attributes or use deprecated arguments. Run terraform validate and terraform plan before deploying.

Refactoring Ansible Playbooks

Highlight a monolithic playbook and ask: “Split this into roles following best practices.” Continue creates the proper directory structure (roles/webserver/tasks/main.yml) and separates variables, handlers, and templates logically.

Creating Prometheus Alert Rules

Describe your monitoring needs: “Alert when API latency p95 exceeds 500ms for 5 minutes.” Continue generates PromQL expressions with appropriate thresholds:

- alert: HighAPILatency
  expr: histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m])) > 0.5
  for: 5m

Critical: Validate all system commands and infrastructure code in staging environments first. AI models can confidently suggest incorrect configurations that may cause outages.

Performance Optimization and Best Practices

Continue.dev maintains conversation context across sessions, but large codebases can slow performance. Configure context limits in ~/.continue/config.json:

{
  "contextLength": 8000,
  "maxTokens": 2048,
  "embeddingsProvider": {
    "provider": "transformers.js",
    "model": "all-MiniLM-L6-v2"
  }
}

For projects with extensive Terraform configurations or Ansible playbooks, use .continueignore to exclude generated files:

# .continueignore
*.tfstate
*.tfstate.backup
node_modules/
.terraform/

Prompt Engineering for Infrastructure Code

When generating infrastructure-as-code, provide explicit constraints to reduce hallucination risks:

# Good prompt: "Generate a Prometheus alerting rule for CPU usage 
# above 80% for 5 minutes, using the node_exporter metric 
# node_cpu_seconds_total in recording rule format"

# Poor prompt: "Create a CPU alert"

⚠️ Critical Warning: Always validate AI-generated system commands before execution. Continue.dev may suggest destructive operations like terraform destroy or kubectl delete namespace without full context awareness.

Model Selection Strategy

Switch models based on task complexity:

  • Quick refactoring: Use GPT-4o-mini or Claude 3.5 Haiku for speed
  • Architecture decisions: Use Claude 3.5 Sonnet or GPT-4 for deeper reasoning
  • Code review: Use o1-mini for logical verification

Configure model shortcuts in settings:

{
  "models": [
    {"title": "Fast", "provider": "openai", "model": "gpt-4o-mini"},
    {"title": "Deep", "provider": "anthropic", "model": "claude-3-5-sonnet-20241022"}
  ]
}

Test generated Kubernetes manifests in staging environments and verify Ansible playbook syntax with ansible-playbook --syntax-check before production deployment.