Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here. Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
This branch has not been deployed
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.
Closes #157
Depends on #158. This branch includes #158's commit, so review only the last two commits (
feat(ai-summaries): add OpenAI-compatible providerandfix(ai-summaries): bind compatible API key to its base URL). Once #158 merges, this diff shrinks to those commits.AI summaries could only reach
api.openai.comand only with the three public OpenAI models. This adds an explicit OpenAI-compatible provider for self-hosted servers and gateways that implement the Responses API, such as LiteLLM. The OpenAI provider is unchanged, including its model list.Behaviour
AISummarySettingsgainsprovider(openai/openai-compatible),compatibleBaseURLandcompatibleModel. All decode withdecodeIfPresent, so older settings load unchanged. Unknown providers decode asopenai. The OpenAImodelfield keeps its existing normalization.AISummaryEndpointresolves the destination. A compatible base URL must be HTTPS (plain HTTP only forlocalhost,127.0.0.1and[::1]) and must have no credentials, query or fragment. Trailing slashes are removed. A missing or invalid URL, or an empty model, throws before any request, so there is never a fallback to OpenAI.openai-compatible-api-key), and the key is stored with the base URL it was saved for. If the base URL changes, that key is not used: status shows "Stored key belongs to a different base URL" and no request is sent until a key is saved for the new URL. Saving requires a valid base URL. The stored OpenAI key andOPENAI_API_KEYare never sent to a compatible endpoint.clearAllCredentialsclears both slots.reasoning.effort, which is OpenAI-specific. Error messages name the endpoint instead of OpenAI.AISummarySettingsSection, which keepsAdvancedSettingsViewunder 500 lines. It adds a provider picker, Base URL and Model fields (applied on Return or Test), and a key field for whichever provider is selected.repobar settings setacceptsai-summary-provider,ai-summary-base-urlandai-summary-compatible-model, and validates them the same way. Documented indocs/cli.mdalongside the existingai-summariesandai-summary-modelkeys.Verification
reasoning; zero requests when the URL is invalid, only an OpenAI key exists, or the stored key belongs to a different URL; the redirect delegate refusing redirects (tested directly); endpoint-named errors; and the CLI keys.pnpm format,pnpm lint(pinned SwiftLint and SwiftFormat): clean.pnpm test: 95 CLI and 661 app tests passed. Run withcore.hooksPathunset, because this machine's global git hooks reject theLocalGitServicetests' throwaway commits.pnpm test:tooling: 24 passed. The iOSbuild-for-testingstep fromci.yml: succeeded./v1/responses,deepseek-flash) through the realURLSessionpath: both the connection test and a PR summary returned clean single sentences.http://remote URL showed "Base URL must use HTTPS unless it points to localhost." and sent nothing. The HTTPS gateway URL with a typed (unsaved) key showed "Test passed: RepoBar AI summaries are ready. Typed key was not saved." The provider, cleaned-up URL and model persisted across relaunch.Limits: compatible servers must implement
POST {base}/responses; Chat Completions-only servers are not supported. Reasoning-heavy models can spend most of the 1024-token output budget before answering.