d daedalus

Edge LLM

Edge LLM

Use an edge or hosted LLM when the build runs on a device too small to hold a local model, but you still want the AI-assisted dependency pass over a slow or awkward dependency graph.

When to use Edge LLM

  • the build host is a slim edge device (low RAM, no GPU) that cannot run Ollama
  • the source tree uses enterprise or legacy runtimes that the static detector labels as "unknown"
  • you want consistent proposals across a fleet of builders, backed by one centrally configured model
  • the build lane can reach a private endpoint, but you do not want model weights on the device

Unlike the fully local Ollama path, an edge model is reached over the network and requires credentials. Those credentials are stored in daedalus's secret store so they never appear in the artifact or in committed config.

Configuration

# daedalus.toml
[ai]
provider = "edge"
base_url = "https://llm.internal.example.com/v1"
model = "gpt-4o-mini"
api = "openai"               # openai / anthropic / azure / generic

[secrets]
ai_token = "edge-llm-token"

Environment overrides use the same DAEDALUS_AI_* prefix (higher priority):

export DAEDALUS_AI_PROVIDER=edge
export DAEDALUS_AI_BASE_URL=https://llm.internal.example.com/v1
export DAEDALUS_AI_MODEL=gpt-4o-mini
export DAEDALUS_AI_API=openai
export DAEDALUS_AI_TOKEN=edge-llm-token
Layer Key Purpose
env DAEDALUS_AI_PROVIDER / ai.provider edge selects the hosted provider
env DAEDALUS_AI_BASE_URL / ai.base_url Chat-completions-compatible endpoint
env DAEDALUS_AI_MODEL / ai.model Model version to call
env DAEDALUS_AI_API / ai.api Wire protocol (openai, anthropic, azure, generic)
secret DAEDALUS_AI_TOKEN / secrets.ai_token API token, kept in the secret store

Build with AI assistance

export DAEDALUS_AI_PROVIDER=edge
export DAEDALUS_AI_BASE_URL=https://llm.internal.example.com/v1
export DAEDALUS_AI_TOKEN=${EDGE_TOKEN_FROM_CI}
daedalus build --ai-assist

The builder sends a compact prompt (runtime, entrypoint, open questions) and the edge model answers with the proposed dependencies, which are then verified against the real filesystem before assembly.

Because the token is expected in the secret store, set it from your CI secret manager (e.g. EDGE_TOKEN_FROM_CI) rather than a literal value. The builder never echoes the token, and detect_secret_keys guards the packaged layer.

Troubleshooting

  • 401/403 — the token in [secrets] is wrong or expired.
  • Timeout — the edge endpoint is slow; raise the request timeout or use a smaller model.
  • Wrong dialect — set ai.api to the provider's protocol (openai, anthropic, azure).