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

Configurably Disable OpenAI -> Gemini Model Mapping #41

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

ekatiyar
Copy link
Contributor

@ekatiyar ekatiyar commented Aug 8, 2024

Introduces a new environment variable, DISABLE_MODEL_MAPPING, when enabled removes the OpenAI -> Gemini Model mapping and and directly exposes the underlying gemini models in the api endpoints.

Moved model mapping logic to its own models.go file inside the adapter package. Additionally, fixed a bug where responses would return the gemini model name even though model mapping was enabled.

My previous PR (#38) had some extraneous changes and disabled model mapping by default. This change provides that functionality in a configurable way, better addressing #35 and contains no breaking changes for preexisting setups.

Introduce a new environment variable, DISABLE_MODEL_MAPPING, when
enabled removes the OpenAI -> Gemini Model mapping and provides
access to the named gemini models directly.

Moved model mapping logic to its own `models.go` file inside the
adapter package.

Additionally, fixed a bug where responses would return the gemini
model name even though model mapping was enabled.
@ekatiyar
Copy link
Contributor Author

ekatiyar commented Aug 8, 2024

@zhu327 Here is the cleaned up version of disabled model mapping

@zhu327
Copy link
Owner

zhu327 commented Aug 8, 2024

LGTM

@zhu327 zhu327 merged commit fddc1e2 into zhu327:main Aug 8, 2024
1 check passed
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.

2 participants