Eridian

Code Completion

Context-aware completions grounded in the indexed repository.

Completion returns inline suggestions for the file under the cursor. Eridian injects open files, recent commits, and retrieved chunks from the repository index. The editor talks to POST /v1/dev/completions. That call is inference with a Dev schema, not a second model stack.

Request

POST /v1/dev/completions
Host: api.geteridian.com
Authorization: Bearer eridian_sk_...
Content-Type: application/json
X-Eridian-Project: prj_dev_001
{
  "repository_id": "repo_payments_core",
  "model": "auto",
  "routing_policy": "latency_optimized",
  "language": "typescript",
  "path": "src/ledger/posting.ts",
  "prefix": "export function postEntry(entry: JournalEntry) {\n  if (!entry.idempotencyKey) {\n",
  "suffix": "\n  }\n  return ledger.append(entry)\n}\n",
  "open_files": [
    { "path": "src/ledger/types.ts", "hash": "c0ffee01" }
  ],
  "max_tokens": 256,
  "features": ["semantic_cache"]
}

Required scope: dev:write. Send prefix and suffix as the buffer around the cursor. Do not send the entire repository in open_files. The gateway retrieves additional chunks.

Response

{
  "id": "cmp_9aa1",
  "object": "eridian.dev.completion",
  "model": "gemini",
  "choices": [
    {
      "index": 0,
      "text": "      throw new MissingIdempotencyKeyError(entry.id)",
      "finish_reason": "stop"
    }
  ],
  "eridian": {
    "request_id": "axm_req_cmp_9aa1",
    "route": "gemini",
    "cache_hit": true,
    "rag_chunks": 4,
    "latency_ms": 210,
    "cost_usd": 0.0004,
    "region": "eu-west-1"
  }
}

eridian.route is gpt or gemini. Editors should display it in a debug panel, not branch on it.

Latency

Completion is the latency-sensitive path. Use routing_policy: latency_optimized and keep max_tokens small. Semantic cache keys include repository id, path, prefix hash, and template version. A 30%+ hit rate is typical on a busy desk after the first hour.

PercentileEnterprise target (in-region)
p50180ms
p95450ms
p99900ms

If p95 exceeds 1s, check index freshness and whether open_files is oversized. See Dev Limits.

Editor integration

Official plugins post to /v1/dev/completions and send X-Eridian-Client: vscode|jetbrains|neovim. Configure:

export ERIDIAN_API_KEY=eridian_sk_...
export ERIDIAN_PROJECT_ID=prj_dev_001
export ERIDIAN_BASE_URL=https://api.geteridian.com/v1

Self-hosted editors must send the same schema. Do not proxy through an OpenAI-compatible path unless you have read SDKs and still attach project_id.

Privacy

PII redaction is on by default for Dev projects that inherit institution policy. Comments and string literals that look like account numbers are masked before GPT or Gemini. Completions that would re-emit a masked span fail closed when pii_config.strategy is block. See PII Redaction.

Disable

Set features without semantic_cache per request, or disable completion on the repository:

PATCH /v1/dev/repositories/repo_payments_core
Authorization: Bearer eridian_sk_...
{ "completion": { "enabled": false } }

See Codebase Q&A for retrieval that is not inline, and Routing for pinning GPT on a desk that rejected Gemini completions in eval.

Production API credentials are issued with an institution workspace. Contact sales if you need access.