Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add Google VertexAI Provider Support #19

Open
8 tasks
galkleinman opened this issue Dec 23, 2024 · 7 comments · May be fixed by #21 or #24
Open
8 tasks

Feature Request: Add Google VertexAI Provider Support #19

galkleinman opened this issue Dec 23, 2024 · 7 comments · May be fixed by #21 or #24
Labels
💎 Bounty enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed provider

Comments

@galkleinman
Copy link
Contributor

galkleinman commented Dec 23, 2024

Overview

Add support for Google VertexAI models as a new provider in the Hub. This will allow users to route their LLM requests to Google's models like Gemini through our unified API interface.

Background

Currently, Hub supports OpenAI, Anthropic, and Azure OpenAI providers (see src/providers/mod.rs). Adding Google VertexAI support will expand the available model options and give users more flexibility in choosing their LLM providers.

Technical Details

New Provider Implementation

Create a new provider implementation in src/providers/vertexai/ following the existing provider pattern. Reference implementation can be found here

Required Components

  1. Create a new module structure:

    • src/providers/vertexai/mod.rs
    • src/providers/vertexai/provider.rs
    • src/providers/vertexai/models.rs
  2. Implement the Provider trait with the following methods (support streaming, non-streaming, tools, functions, multi modality etc...)

    • chat_completions
    • completions
    • embeddings
  3. Add necessary request/response models for VertexAI API in models.rs

  4. Update the provider registry to include VertexAI

Configuration

  1. Add a new provider section:
providers:
  key: vertexai
type: vertexai
project_id: "<your-gcp-project-id>"
location: "<your-gcp-region>"
credentials_path: "/path/to/service-account.json" # Optional
  1. Update the configuration example to include VertexAI settings.

Requirements

  • Implement authentication using Google Cloud credentials
  • Support both API key and service account authentication methods
  • Handle proper error mapping from Google API responses to our status codes
  • Implement proper request/response mapping for all endpoints
  • Add comprehensive tests for the new provider
  • Update documentation to include VertexAI setup instructions

Resources

Definition of Done

  • Implementation of VertexAI provider
  • Unit tests with good coverage
  • Integration tests with actual API calls (using test credentials)
  • Documentation updates
  • Example configuration
  • Successful chat completion, completion, and embedding requests
  • Error handling and proper status code mapping
  • PR review and approval

Additional Notes

  • Feel free to ask questions in the issue comments
  • We recommend creating a draft PR early to get feedback during implementation
  • Make sure to follow the existing code style and patterns
  • Don't commit any actual API keys or credentials
@galkleinman galkleinman added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed provider labels Dec 23, 2024
@galkleinman
Copy link
Contributor Author

/bounty $300

Copy link

algora-pbc bot commented Dec 23, 2024

💎 $300 bounty • traceloop

Steps to solve:

  1. Start working: Comment /attempt #19 with your implementation plan
  2. Submit work: Create a pull request including /claim #19 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to traceloop/hub!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @Saturn225 Dec 23, 2024, 5:59:59 PM WIP
🟢 @Gmin2 Dec 23, 2024, 6:45:36 PM #21
🟢 @onyedikachi-david Dec 30, 2024, 12:56:39 PM #24

@Saturn225
Copy link

Saturn225 commented Dec 23, 2024

/attempt #19

Algora profile Completed bounties Tech Active attempts Options
@Saturn225 3 bounties from 3 projects
Scala, PLpgSQL,
HTML & more
Cancel attempt

@Gmin2
Copy link

Gmin2 commented Dec 23, 2024

/attempt #19

Algora profile Completed bounties Tech Active attempts Options
@Gmin2 14 bounties from 7 projects
TypeScript, JavaScript,
Go & more
Cancel attempt

@Gmin2 Gmin2 linked a pull request Dec 23, 2024 that will close this issue
8 tasks
Copy link

algora-pbc bot commented Dec 23, 2024

💡 @Gmin2 submitted a pull request that claims the bounty. You can visit your bounty board to reward.

@onyedikachi-david
Copy link

onyedikachi-david commented Dec 30, 2024

/attempt #19

Algora profile Completed bounties Tech Active attempts Options
@onyedikachi-david 14 bounties from 7 projects
TypeScript, Python,
JavaScript & more
Cancel attempt

@onyedikachi-david onyedikachi-david linked a pull request Dec 30, 2024 that will close this issue
35 tasks
Copy link

algora-pbc bot commented Dec 30, 2024

💡 @onyedikachi-david submitted a pull request that claims the bounty. You can visit your bounty board to reward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Bounty enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed provider
Projects
None yet
4 participants