Repository navigation
Conversation
4535d59 to
9ea4691
Compare
|
Thanks for the work. This PR is 1,672 lines across 27 files, above the review threshold we can apply line by line (2,500 lines or 15 files). I am parking it for the current wave rather than closing it: the PR stays open and the work is kept. To get it reviewed, please split it by subsystem into PRs under that threshold. For this one, a natural split is: provider detection, config and UI, tests. If the feature is already on the roadmap, link the tracking issue and we will pick it up there. |
9ea4691 to
abf9422
Compare
abf9422 to
addefea
Compare
|
Following the request to split by subsystem, the original change is now separated into three review units, in dependency order:
The key boundary is providing the capability first, then explicitly activating it through configuration. In #750, zero Regression tests stay with the subsystem they exercise, so the request behavior, migration semantics and UI-facing API can each be reviewed with their verification. The preview handler belongs with #898 because it serves draft UI inputs without loading or saving a profile. Shared files receive only the changes needed by each layer. The complete file scope of this PR (#750) is:
Draft/base limitation: #897 and #898 currently target All three branches are based on main The upstream release containing BaaRai/Norma#15 — feat(llm): add request-scoped prompt cache keys is still a merge prerequisite; the fork pin must be replaced before merging. |
Known gateways use different cache-routing hints, and retrying an expired TokenHub binding with the same routing ID cannot repair it. This PR adds the provider-layer resolver and bounded recovery mechanism. Callers opt in through
agent.Config.Options; existing profile, environment and connection-test paths keep their legacy behavior until the separate configuration integration supplies an explicit policy.Scope
This is the provider subsystem split requested in the review: 8 files, +938/-10 lines, rebased onto main
2f065a958e4bc84e300ece4af501a5cdd3ed08cd.prompt_cache_keyvalues for supported Chat/Responses policies.410001, once per logical invocation, including SDK retries. Require a live context, replayable body and eligible generation request.Dependent subsystem drafts
The remaining work is now published for visibility:
Both are dependency drafts targeting main because the contributor cannot create upstream branches for a cross-fork stack. Their current PR diffs include their predecessors (17 and 28 cumulative files). After each predecessor merges, rebase the next draft onto main and remove the inherited commits before requesting review; this brings each PR down to its own subsystem's review size.
All three branches have been rebased onto main after its route-permission refactor. The preview uses the new authenticated route registration and has an end-to-end session test.
Validation
On this provider-only commit:
go test -race ./agent ./llmpolicy -count=1with an isolated PostgreSQL database: 584 tests/subtests passed; one existing root-only filesystem test skipped because the local runner is unprivileged.go test -race github.com/Autumn-27/norma/llm -count=1: 91 tests/subtests passed.go build ./...,go vet ./..., and cross-builds for Linux amd64, Windows amd64, macOS amd64 and the native macOS arm64 target passed.max_tokens/max_completion_tokens, Responsesmax_output_tokens, bounded recovery, ineligible requests, concurrent routing, expiry and redirect policy preservation.SDK merge prerequisite
BaaRai/Norma#15 remains open. The provider layer needs its
CompletionRequest.PromptCacheKeyandConfig.ResolvedBaseURL()APIs. The review branch retains the publicly fetchable immutable pingithub.com/renaesop/Norma v0.4.14-0.20261201033148-d14bb979d978to build independently. Replace it with an upstream BaaRai/Norma release containing those APIs before merging.