Skip to content

Add Gemini POST endpoint and tests#56

Merged
goldlabelapps merged 1 commit intomasterfrom
staging
Apr 4, 2026
Merged

Add Gemini POST endpoint and tests#56
goldlabelapps merged 1 commit intomasterfrom
staging

Conversation

@goldlabelapps
Copy link
Copy Markdown
Owner

Replace GET /gemini response with make_meta and add a POST /gemini handler that sends prompts to Google's genai SDK. The POST route validates input and GEMINI_API_KEY, tries a list of Gemini model names with error aggregation, and returns meta + completion data. requirements.txt adds google-genai dependency. Tests updated: adapt GET test to new meta response, add a mocked POST test for completions, and include an optional real-API test that is skipped when GEMINI_API_KEY is not set.

Replace GET /gemini response with make_meta and add a POST /gemini handler that sends prompts to Google's genai SDK. The POST route validates input and GEMINI_API_KEY, tries a list of Gemini model names with error aggregation, and returns meta + completion data. requirements.txt adds google-genai dependency. Tests updated: adapt GET test to new meta response, add a mocked POST test for completions, and include an optional real-API test that is skipped when GEMINI_API_KEY is not set.
@goldlabelapps goldlabelapps merged commit 922551f into master Apr 4, 2026
2 checks 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.

1 participant