Matching og#1
Open
ryanhellyer wants to merge 5 commits into
Open
Conversation
…ey forwarding - Support multiple upstream providers (OpenAI, Anthropic, Groq, Mistral, Ollama, XAI, etc.) - Add fallback_models parameter with exponential backoff retry logic - Forward client-provided API keys for authenticated requests - Replace Laravel AI agent with direct HTTP client implementation - Update README with authentication modes and provider selection
Update the DEFAULT_PROMPT constant to explicitly request Conventional Commits format and restrict output to only the commit message without analysis or preamble.
… and provider-driven defaults; update config, scripts, and tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add multi-provider AI support to gitmeh, refactor commit message generation into a dedicated service, and introduce an OpenAI-compatible
/v1/chat/completionshosted API endpoint.Changes
GitmehCommitMessageGeneratorservice from the controller. Supports configurable providers (OpenRouter, OpenAI, Anthropic, Groq, Mistral, Ollama, xAI, opencode) with per-provider defaults for base URL, API key, and model. Addsdefault_providerconfig key and request-levelproviderfield./v1/chat/completions): NewGitmehChatCompletionsControllerexposing an OpenAI-shaped JSON endpoint. Middleware added for: method restriction (POST only, 405 for others), JSON body size limiting (configurable, 413 on exceed), optional Bearer auth (custom client keys forwarded to upstream provider). Shares daily rate limits with the legacy plain-text endpoint.fallback_modelsarray — if the primary model fails with a context-length or retryable error, subsequent models are tried automatically with exponential backoff.services.openrouter.*settings intogitmeh.*namespace. New config keys:prompt,timeout,hosted_bearer_token,max_json_request_bytes,chat_inference_timeout_seconds.gitmeh.shnow usesOPENAI_API_KEY/OPENAI_MODEL(generalized from OpenRouter-specific vars)./v1/chat/completionsendpoint covering success, errors, auth, fallback models, provider selection, rate limit sharing, oversized bodies, and invalid inputs.scripts/verify-hosted-api.shto smoke-test the deployed endpoint.docs/hosted-api-migration-instructions.mdwith the server-side implementation contract.