Commit Graph
2 Commits
Author SHA1 Message Date
yetone 5ba92aaf86 provider: a typed base that serves chat is never given a /v1 (JNDliuliuM on X)
A custom provider whose API has no /v1 listed its models under
base/v1/models only; every models fetch then rewrote the saved chat and
responses URLs to …/v1 (fixV1), so the user's removal of /v1 came back each
time and requests went to /v1/chat/completions. fixV1 now POSTs an empty body
to base/chat/completions (or /responses) first; any answer but 404/405 (a 400
for the model, a 401) means the URL as typed has its endpoint and it is kept.
Only a base whose endpoint is missing and whose models sit under /v1 gets it.

Run (mote): new TestFetchKeepsTypedBaseThatServesChat red on the old code
(chat changed to …/v1), green after; go test ./internal/provider ok;
TestFetchAddsMissingV1 and TestArkBaseKeepsItsPath unchanged; go vet darwin,
linux, windows. Not tried: a real vendor; the GUI is unchanged (respellURL
only fills an empty URL), so no GUI run.
2026-11-12 11:38:52 +08:00
TryWorld 037a79b964 fix(provider): preserve unreadable configuration on edits (#415)
Propagate providers.json read and decode errors through catalog writes. Only a missing file allows first-use creation; failed reads preserve the original file.
2026-10-01 18:33:45 +08:00