GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add LiteLLM provider for graph queries and embeddings by prodmanpd · Pull Request #1875 · CodeGraphContext/CodeGraphContext

Conversation

@prodmanpd

@prodmanpd prodmanpd commented Oct 28, 2026

Copy link
Copy Markdown

Summary

Adds LiteLLM as an opt in provider in both places CodeGraphContext calls a model: natural language graph queries (/api/ai_query) and the embeddings behind ENABLE_VECTOR_RESOLVE. Set LITELLM_MODEL=anthropic/claude-sonnet-4-6 (or bedrock/..., vertex_ai/..., ollama/...) and CGC_EMBEDDING_MODEL=litellm/<provider>/<model> to reach any of them, using each provider's own credentials. Nothing changes unless one is set.

Changes

  • viz/server.py: _call_litellm() call_llm() uses it when LITELLM_MODEL is set, and ai_query() accepts it as a configured provider.
  • tools/indexing/embeddings.py: _LiteLLMEmbedder. Vector size comes from LiteLLM's model map, or one probe call for unmapped models, resolved only when the Neo4j index needs it; results are reordered and length checked.
  • cli/config_manager.py: LITELLM_MODEL and LITELLM_API_BASE keys; CGC_EMBEDDING_MODEL litellm/... now validates.
  • pyproject.toml: optional extra litellm>=1.97.0,<1.106.0.

Tests

  • 29 new unit tests against a stubbed litellm, through the real call_llm, /api/ai_query, _get_embedder, the backend probe, EmbeddingPipeline.run and config validation. Neighbouring suites unchanged; ruff check and ruff format --check clean.
  • Live against Vertex AI, on litellm 1.97.0 and 1.105.3:
[chat] vertex_ai/gemini-2.5-flash -> HTTP 200
[embeddings] litellm/vertex_ai/text-embedding-005 -> probe (True, 'litellm'), index 768, 5 functions embedded

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@prodmanpd
feat: add LiteLLM provider for graph queries and embeddings
bf1d777
@github-project-automation github-project-automation Bot added this to CGC Progress Board Oct 28, 2026
@github-project-automation github-project-automation Bot moved this to Backlog tasks in CGC Progress Board Oct 28, 2026
@vercel

vercel Bot commented Oct 28, 2026

Copy link
Copy Markdown

@prodmanpd is attempting to deploy a commit to the shashankss1205's projects Team on Vercel.

A member of the Team first needs to authorize it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This branch has not been deployed

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

CGC Progress Board
Status: Backlog tasks

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@prodmanpd
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.