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

Add GoogleOpenAISchema with comprehensive test logging #234

Merged
merged 14 commits into from
Nov 12, 2024

Conversation

devin-ai-integration[bot]
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Nov 12, 2024

Add Google Gemini 1.5 Models and Aliases

This PR adds support for Google's Gemini 1.5 models to the user preferences registry and prepares for release v0.63.0.

Changes

  • Added new Gemini 1.5 models with correct aliases:
    • gem15p -> Gemini 1.5 Pro
    • gem15f -> Gemini 1.5 Flash
    • gem15f8 -> Gemini 1.5 Flash 8b
  • Added warning about token/cost counting limitations in GoogleOpenAISchema
  • Removed unnecessary logging from test/llm_openai_schema_def.jl
  • Thanks to @Sixzero, added support for Google Flash via OpenRouter and Qwen 72b models

Testing

All changes have been tested:

  • Model aliases work correctly with GoogleOpenAISchema
  • Test suite passes without the removed logging
  • Documentation updates are accurate and properly formatted

Version Update

  • Updated version to 0.63.0 in preparation for release
  • Added changelog entries under v0.63.0 section

Link to Devin run: https://preview.devin.ai/devin/e38549301554482bb3f3cc01e628b01c

- Add GoogleOpenAISchema struct with documentation
- Implement create_chat method with Google API base URL
- Implement create_embedding method with Google API base URL
- Use GOOGLE_API_KEY for authentication
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.97%. Comparing base (eeb0dfc) to head (341dbcc).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #234      +/-   ##
==========================================
+ Coverage   91.95%   91.97%   +0.02%     
==========================================
  Files          47       47              
  Lines        4609     4622      +13     
==========================================
+ Hits         4238     4251      +13     
  Misses        371      371              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Added new models:
- gemini-1.5-pro-latest
- gemini-1.5-flash-8b-latest
- gemini-1.5-flash-latest

Added corresponding aliases:
- gem15p
- gem15f8
- gem15f

Set pricing according to Google's pay-as-you-go rates:
Input: /bin/bash.075/1M tokens
Output: /bin/bash.30/1M tokens
…gleOpenAISchema methods

- Add GoogleProvider struct with proper Bearer token authentication
- Update create_chat to use GoogleProvider and openai_request
- Update create_embeddings to use GoogleProvider and openai_request
- Maintain consistent URL handling up to /v1beta
- Add Gemini 1.5 models (Pro, Flash, Flash 8b) with correct pricing
- Fix GoogleOpenAISchema tests to properly handle GOOGLE_API_KEY
- Save and restore original API key value during testing
- Add detailed request header logging
- Track authorization header values and expectations
- Log request body content and responses
- Improve debugging capabilities for test failures
@devin-ai-integration devin-ai-integration bot changed the title Add GoogleOpenAISchema with OpenAI compatibility mode Add GoogleOpenAISchema with comprehensive test logging Nov 12, 2024
Copy link
Contributor Author

Devin is currently unreachable - the session may have died.

- Update version to 0.63.0
- Add warning about token/cost counting limitations in GoogleOpenAISchema
- Update changelog with correct model aliases (gem15p, gem15f, gem15f8)
- Remove logging from test/llm_openai_schema_def.jl
@svilupp svilupp merged commit 698a594 into main Nov 12, 2024
6 checks passed
@svilupp svilupp deleted the google_openai_schema branch November 12, 2024 21:22
svilupp pushed a commit that referenced this pull request Nov 26, 2024
* Add GoogleOpenAISchema with OpenAI compatibility mode

- Add GoogleOpenAISchema struct with documentation
- Implement create_chat method with Google API base URL
- Implement create_embedding method with Google API base URL
- Use GOOGLE_API_KEY for authentication

* test: Add tests for GoogleOpenAISchema implementation

* test: Enhance GoogleOpenAISchema tests to improve coverage

* Move GoogleOpenAISchema tests to llm_openai_schema_def.jl

* feat: Add Gemini 1.5 models and aliases to user_preferences.jl

Added new models:
- gemini-1.5-pro-latest
- gemini-1.5-flash-8b-latest
- gemini-1.5-flash-latest

Added corresponding aliases:
- gem15p
- gem15f8
- gem15f

Set pricing according to Google's pay-as-you-go rates:
Input: /bin/bash.075/1M tokens
Output: /bin/bash.30/1M tokens

* Update Gemini model pricing to reflect correct per-million token rates

* revert: Remove unintended changes to test/llm_google.jl

* revert: restore test/llm_google.jl to original state from main branch

* feat: Add GoogleProvider with proper Bearer token auth and update GoogleOpenAISchema methods

- Add GoogleProvider struct with proper Bearer token authentication
- Update create_chat to use GoogleProvider and openai_request
- Update create_embeddings to use GoogleProvider and openai_request
- Maintain consistent URL handling up to /v1beta

* feat: Add Gemini models to registry and fix GoogleOpenAISchema tests

- Add Gemini 1.5 models (Pro, Flash, Flash 8b) with correct pricing
- Fix GoogleOpenAISchema tests to properly handle GOOGLE_API_KEY
- Save and restore original API key value during testing

* fix: restore gpt-4-turbo-preview model and ensure correct model ordering

* Add comprehensive logging to GoogleOpenAISchema test mock servers

- Add detailed request header logging
- Track authorization header values and expectations
- Log request body content and responses
- Improve debugging capabilities for test failures

* fix: Update auth_header in GoogleProvider to use OpenAIProvider implementation

* chore: prepare release v0.63.0

- Update version to 0.63.0
- Add warning about token/cost counting limitations in GoogleOpenAISchema
- Update changelog with correct model aliases (gem15p, gem15f, gem15f8)
- Remove logging from test/llm_openai_schema_def.jl

---------

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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