Skip to content

fix(index): honor llamacpp provider and show underlying error details#5

Open
randomshinichi wants to merge 1 commit intokraklabs:mainfrom
randomshinichi:fix/llamacpp-provider-mapping
Open

fix(index): honor llamacpp provider and show underlying error details#5
randomshinichi wants to merge 1 commit intokraklabs:mainfrom
randomshinichi:fix/llamacpp-provider-mapping

Conversation

@randomshinichi
Copy link
Copy Markdown

@randomshinichi randomshinichi commented Feb 24, 2026

Unrelated: you have a mac library committed in there, lib/libcozo_c.a

This PR fixes two issues in cie index:

  1. embedding.provider: llamacpp was not honored by CLI mapping
    • cmd/cie/index.go only mapped a limited set of providers and silently fell back to mock for unknown values.
    • As a result, valid llamacpp config could be downgraded to mock at runtime.
  2. Underlying error details were hidden in CLI output
    • internal/errors.UserError.Format() printed only high-level message/cause/fix.
    • Wrapped/root errors were not shown, making troubleshooting difficult.

What changed

cmd/cie/index.go

  • Updated provider mapping to explicitly support:
    • llamacpp
    • qodo
  • Changed default behavior to preserve unknown provider strings so provider validation happens in the embedding layer (instead of
    silent fallback to mock).
  • Added llama.cpp env wiring:
    • LLAMACPP_EMBED_URL now populated from config embedding.base_url.

internal/errors/errors.go

  • UserError.Format() now appends:
    • Details:
  • This surfaces wrapped exceptions directly in CLI output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant