Skip to content

LCORE-4705: Implemented vertexai provider - #2967

Open
asimurka wants to merge 1 commit into
lightspeed-core:mainfrom
asimurka:vertexai-inference-provider
Open

asimurka wants to merge 1 commit into
lightspeed-core:mainfrom
asimurka:vertexai-inference-provider

Conversation

@asimurka

Copy link
Copy Markdown
Contributor

Description

Implements the Vertex AI runtime inference provider as part of the PAI providers registry migration.

  • Adds VertexAIInferenceProvider backed by Pydantic AI GoogleCloudProvider, GoogleModel, and GoogleEmbeddingModel
  • Discovers models via the Vertex AI / Google GenAI model catalog (client.aio.models.list()), preserving full catalog resource names (including Model Garden publisher paths)
  • Infers model type from:
    1. Pydantic AI known model/embedding names (using the short id after the last /)
    2. catalog supported_actions (embedContent → embedding; otherwise llm)
  • Creates LLM and embedding model instances for allow-listed catalog entries
  • Rejects rerank with ModelTypeNotSupportedError (no Vertex rerank API)
  • Auth uses Application Default Credentials (GOOGLE_APPLICATION_CREDENTIALS when a credentials file is required)
  • Registers the provider in the inference provider registry
  • Adds unit tests covering provider construction, discovery, model creation, and type inference

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library [pyproject.toml + uv.lock]
  • Bump-up dependent library [requirements.*.txt for Konflux]
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: Cursor
  • Generated by: N/A

Related Tickets & Documents

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  1. Unit tests:
    uv run pytest tests/unit/providers/inference/vertexai/ -q
  2. Optional manual smoke (requires ADC + project/location):
    • Configure a vertexai inference provider entry with project / location
    • Ensure GOOGLE_APPLICATION_CREDENTIALS (or other ADC) is available
    • Start the stack and verify models are discovered and LLM/embedding requests succeed for allow-listed models
    • Confirm rerank requests fail with an unsupported model-type error

@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 20 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: lightspeed-core/lightspeed-stack/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 1469928c-e5bf-45b4-bfe2-1a23c0ef8aee
📥 Commits

Reviewing files that changed from the base of the PR and between 5827b36 and b8f8f4f.

📒 Files selected for processing: 6
  • src/providers/inference/registry.py
  • src/providers/inference/vertexai/README.md
  • src/providers/inference/vertexai/__init__.py
  • src/providers/inference/vertexai/provider.py
  • tests/unit/providers/inference/vertexai/__init__.py
  • tests/unit/providers/inference/vertexai/test_provider.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant