Skip to content

[P1.5-S3-ARI-21] VertexAILLMClient — new LLMClientInterface implementation #55

@bjridicodes

Description

@bjridicodes

Ticket: P1.5-S3-05

Type: Feature | Est: 1.5d

Goal: ARIA runs LLM inference via Vertex AI (Gemini or Claude-on-Vertex) when deployed on GCP — no Anthropic API key or Claude Code subscription required in the container.

Scope:

  • implementations/llm/vertex_ai/llm_client.py (new): VertexAILLMClient implements LLMClientInterface
    • Constructor: model: str, project_id: str, location: str = "europe-west1"
    • Auth via ADC (google.auth.default()) — no credentials in constructor
    • complete(messages, max_tokens, temperature, system):
      • Gemini models: use google.cloud.aiplatform.gapic.PredictionServiceClient or vertexai.generative_models.GenerativeModel
      • Claude-on-Vertex: use Anthropic Messages API via Vertex AI endpoint
    • Raises LLMAuthError, LLMUnavailableError, LLMResponseError matching the existing interface contract
  • requirements.txt: add google-cloud-aiplatform >= 1.60.0
  • implementations/llm/vertex_ai/__init__.py (new, empty)

Supported models: gemini-2.0-flash, gemini-2.5-pro, claude-sonnet@20250201 (Claude-on-Vertex)

Acceptance criteria:

  • VertexAILLMClient fully implements LLMClientInterface (passes interface contract test in tests/unit/test_interfaces.py)
  • complete() returns a string for both Gemini and Claude-on-Vertex model identifiers
  • Unit test with mocked aiplatform SDK; assert correct API endpoint and payload shape
  • LLMAuthError raised on ADC failure (mocked)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1.5-S3S3: Docker + Config + LLM PortabilityfeatureNew capability or user-facing functionalityphase-1.5All Phase 1.5 issues

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions