Conversation
…P, tolerant quota_groups
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Found by the 0.60.4-0.69.0 port gap audit (gap G7, release bullet 0.64.0 #29).
Summary
LLM Proxy now behaves like upstream 0.64.0 for its endpoint handling:
LLM_PROXY_BASE_URLas the fallback. The API key path is unchanged (LLM_PROXY_API_KEYbearer, keyring, or Preferences)..localhosts. Public hosts still need HTTPS, and user info is rejected.?query/#fragmentat the end: the configured base is split at the first?or#, trailing slashes are trimmed,/v1is appended only when the percent-decoded path does not already end in/v1, then/quota-statsand the suffix.quota_groups(string, number, null, array of non-objects, group with a non-numericremaining_percent) is treated as absent for that provider without discarding its requests, tokens or cost. Arrays and objects (values) are both accepted.Upstream reference
v0.64.0(read-only GET):Sources/CodexBarCore/Resources/Plugins/llmproxy.ts(endpoint policy, suffix split, tolerantquota_groups),Sources/CodexBarCore/Providers/LLMProxy/LLMProxySettingsReader.swift(private-network HTTP validation, error text),Sources/CodexBar/Providers/LLMProxy/LLMProxyProviderImplementation.swift(API key + Base URL settings fields).Ported / Deferred
Ported: base URL setting with env fallback, private-network HTTP policy (new
validated_https_or_private_http_urlnext tovalidated_https_url, which keeps its HTTPS-only behavior), suffix-preserving/v1/quota-statsURL, tolerantquota_groups, Settings field with en-US strings, settings-side validation (provider_workspace.rs) so a bad URL is rejected at save time.Left out:
LlmProxy*keys (same fallback path other recent keys use).total_requests) is not ported; existing serde decoding is kept.Validation
All with
cargo +1.98.0through the E-core wrappers, slot-8 target dir.cargo fmt --all: cleancargo clippy --workspace --all-targets -- -D warnings: passcargo test -p codexbar --lib -- llmproxy provider_workspace locale validated: 34 passedcargo test -p codexbar(full): 2167 passed, 0 failed, 1 ignoredcargo test -p codexbar-desktop-tauri: 461 passed, 1 failed, the knownbootstrap_payload_exposes_every_provider_variant(fixed by Isolate bootstrap payload test from real settings #684, ignored per brief)pnpm --dir apps/desktop-tauri exec vitest run: 67 files, 402 tests passedpnpm --dir apps/desktop-tauri run build: passpnpm --dir apps/desktop-tauri run lint: only pre-existing unused-variable warnings in untouched filesNew tests cover URL suffix/
/v1rules (including percent-encodedv1, query and fragment), the https-or-private-http policy (accept and reject lists), settings-over-env precedence, malformed/array/objectquota_groups, and save-time validation.Affected areas
rust/src/providers/llmproxy, shared URL validator inproviders/mod.rs)UI proof
Pending: coordinator will capture CUA proof on a fresh build (LLM Proxy "Base URL" field in the Providers tab).