Repository navigation
Summaries through OpenAI and Anthropic - #60
Merged
Merged
Conversation
This was referenced Sep 30, 2026
thesiti92
added this pull request to stack #66
October 1, 2026 14:23
sidkmenon
approved these changes
Oct 1, 2026
Keys now come from the provider's own variables, and an empty endpoint means the provider's default. Gemini requests are unchanged.
The provider-rejection tests now use an unknown provider, since openai is valid.
Current Claude models reject temperature, and their token limit also covers thinking, so it gets a 4096 floor. Answers are now read from the first JSON array of summaries, which skips lead-ins, trailing notes and reasoning that contain brackets.
Both take only an object at the root, so their answers are {"summaries": [...]}. A server that rejects the schema fails the request; one that ignores it is still parsed leniently.
Gemini now takes the same JSON Schema through responseJsonSchema, and the default prompt asks for the {"summaries": [...]} object.
default.toml repeated the old prompt, so configs without an explicit plugin order kept it. A test now checks that default.toml agrees with each plugin.toml.
thesiti92
force-pushed
the
feat/summary-providers
branch
from
October 1, 2026 14:56
bda7523 to
e98557d
Compare
sidkmenon
approved these changes
Oct 1, 2026
Merged
thesiti92
added a commit
to devdotfast/whiteboard
that referenced
this pull request
Oct 2, 2026
Closes #788. Bundles diffr 0.1.9 (devdotfast/diffr#60, #62 and #65). **Settings → AI summaries** - **Provider:** Gemini, OpenAI (also any OpenAI-compatible server) or Anthropic. Switching resets the model to that provider's default. - **Endpoint URL:** optional. Leave it empty for the provider's own API. - **Prompt:** editable, showing whether it is the default or customized, with "Reset to default". The description says diffr asks for structured output where the provider supports it. - **Test setup:** uses the draft provider, endpoint and prompt, so you can try them before saving. - **Keys:** switching providers clears a key saved for the previous one, so a key is never sent to another vendor. Credentials are checked against the chosen provider's environment variable. **No duplicated defaults.** Provider ids, titles, default models, endpoints, key variables and the keyless rule all come from `diffr config schema`. A default changed in diffr, or a provider added there, needs no change here. **Server** - Reads the default prompt from `diffr config schema`. - Writes only settings that changed. diffr now drops values that equal their defaults, so resetting the prompt removes it from the config file. **Verified** - Unit tests (19) and browser tests (10) pass. - Against a local diffr build with the same code: - switching provider clears the old key and keeps the config file sparse; - resetting the prompt removes it from the file; - Test setup works through a keyless OpenAI-compatible server; - Test setup works live against Anthropic (`claude-sonnet-5-5`). - Checked in an isolated dev Desktop; that check caught two UI fixes. - `test:integration:diffr` (16) passes against the pinned 0.1.9 release.
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.
Adds
openaiandanthropicto the summarizer's existingprovideroption.openaialso works with any OpenAI-compatible server set inendpoint, such as Ollama, LM Studio or OpenRouter. For devdotfast/whiteboard#788.GEMINI_API_KEY/GOOGLE_API_KEY,OPENAI_API_KEYorANTHROPIC_API_KEY.openaiwith a custom endpoint may go without a key.endpoint = ""now means the provider's default URL.{"summaries": [{id, summary, pseudocode}]}: Gemini throughresponseJsonSchema(replacingresponseSchema), OpenAI throughresponse_format(json_schema, strict), Anthropic throughoutput_config.format. OpenAI and Anthropic take only an object at the root, hence the wrapper. A compatible server that rejects the schema fails with its own error.<think>text around it are ignored.max_tokens, since thinking tokens count against it.plugin.wasmis rebuilt withcargo xtask build-plugins. Tested against a local HTTP server, and live against Gemini (gemini-3.8-flash), OpenAI (gpt-5-mini) and Anthropic (claude-haiku-4-5,claude-sonnet-5-5,claude-opus-5-5), including the old materialized prompt:cargo testandcargo xtask test-pluginsboth pass.