Repository navigation
refactor!: retire the legacy field-name aliases and the semantic threshold read default - #1455
Merged
Merged
Conversation
…2a_agent/passthrough_route field names The read side no longer accepts `secret` for `provider_key.api_key`, or `display_name` for `name` on mcp_server, a2a_agent and passthrough_route. The serde aliases, `accept_renamed_field` and its four call sites are gone, and the published strict and lenient schemas now require `api_key` / `name` directly. The export path's redaction of a top-level `secret` on provider keys is dropped with them: export only writes rows the loader accepted, and a row that still carries `secret` is either rejected or has it stripped as an ignored field. Behaviour change: an etcd document or a standalone/file-mode resources file that still uses one of the old names is rejected whole at load and counted in `aisix_config_rejected_resources`. Rename the field (or, for a stored row, delete and recreate the resource) to recover. Fixes #1375
… on read too A `kind: semantic` guardrail whose `deny_examples` / `allow_examples` is non-empty but which omits the matching `deny_threshold` / `allow_threshold` was still loaded with a 0.75 read default. The last control plane that could save such a row (v0.13.0) is below the support floor, so the lenient read schema now requires each threshold beside its own non-empty list, exactly as the write schema does, and the rejection names the missing field. A direction with no example list may still omit its threshold. Behaviour change: a stored row of that shape is rejected whole on load and counted in `aisix_config_rejected_resources`; attachments that reference it are skipped, so the guardrail stops screening. Re-save the guardrail in the console with its threshold set to recover. Fixes #1409
|
Important Review skippedToo many files! This PR contains 473 files, which is 323 over the limit of 150. To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to Team to raise the limit. Usage-priced reviews support at most 300 files.
|
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.
Ships in 1.11.0 (cherry-pick to release/1.11).
This retires two pieces of read-side compatibility whose floor conditions are now met: the control plane is raising the data-plane support floor (
dpfloor.Version) to 1.9.0 in the same release, and re-projects / backfills the affected rows under a new ledger key.1. Old field names are no longer read (#1375). The gateway stopped accepting
secretasprovider_key.api_key, anddisplay_nameasnameonmcp_server,a2a_agentandpassthrough_route. The serde aliases are gone, so isaccept_renamed_fieldand its four call sites, and the regeneratedschemas/resources/andschemas/resources-lenient/now just requireapi_key/name. The export path's extra redaction of a top-levelsecreton provider keys is removed too: export only writes rows the loader accepted, and a row still carryingsecretis now either rejected (noapi_key) or hassecretstripped as an ignored field before redaction runs. The realsecretfields under mcp_server / a2a_agent auth and the realdisplay_nameon provider_key / model / api_key are untouched. Test fixtures that still seeded the old names (unit, integration and e2e) are moved to the new names, and the old dual-spelling tests are replaced by ones pinning that the old names are refused on both the strict and lenient paths and that such an etcd row is rejected whole by the loader while its correctly named twin loads.What changes for users: a standalone / file-mode resources file, or an Admin-API-style document, that still uses
secretor one of thosedisplay_names now fails validation instead of loading. Rename the field. For the managed deployment, a stored etcd row that still carries an old name (only a control plane before 1.8.0 wrote them, and the control plane re-projects provider_key, mcp_server and a2a_agent again in this release) is rejected whole on the new gateway's cold start, and whatever references it (e.g. models on that provider key, that MCP server's tools) goes with it. Operators find such a row inaisix_config_rejected_resources(and/status/config'srejected[]), and recover by deleting the resource and recreating it.2. Semantic guardrail thresholds have no read default for a populated list (#1409). A
kind: semanticguardrail with a non-emptydeny_examples/allow_examplesbut no matchingdeny_threshold/allow_thresholdused to load with 0.75. The lenient read schema now requires each threshold beside its own non-empty list, the same rule the write schema already had, and the load rejection names the missing field. A direction with no example list may still omit its threshold, since the control plane still allows that.What changes for users: such a row could only have been written by a control plane at v0.13.0 or earlier, and the control plane re-runs its threshold backfill under a new ledger key in this release. Any row that pass still leaves behind is rejected whole on the new gateway, attachments referencing it are skipped, and the guardrail stops screening. Find it in
aisix_config_rejected_resources; recover by re-saving the guardrail in the console with the threshold filled in.There is no new config key and nothing to change in the startup
config.yaml.Fixes #1375
Fixes #1409
🤖 Generated with Claude Code