feat(providerroutes): path-prefix routing + model_map + N:M compat matrix#3
Merged
Merged
Conversation
…ix + registry digest Model-mapping-egress data plane (targets develop-v1.0.4): - Route struct path_prefix + longest-prefix (host,path_prefix) lookup (P1b) - per-provider model_map + build-time validation (P1) - SupportsProviderProtocol / Protocols/ProvidersFor + compat matrix (P1i) - SHA256 + Go/Rust golden cross-language parity gate (P1c) - Digest() for the proxy /v1/diagnostics/pipeline registry provenance (7.9) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Author
🔬 Live evidence — path-prefix routing + model_map resolved against the real vendorRun on Aliyun cn-shenzhen + macOS + Windows Server 2025, branch The embedded registry built from
{"registry":{"digest":"d190c3562312","route_rows":21,"providers_with_model_map":["zhipu"]}}Full L1/L2 persisted-row assertions + three-env matrix + tc/netem fault injection are in the aikey-proxy PR. Cross-language parity gate (7.5) and the N:M compatibility-matrix form-validation (7.5c) were not independently exercised this run. |
…R review) roleOfModel's final `strings.Contains(lower,"-"+role)` clause was not segment-aligned (contradicting its own comment) and made the anchored clauses dead code; knownRoles map iteration was nondeterministic on co-occurring tokens. Now: only exact/prefix(`role-`)/suffix(`-role`)/infix(`-role-`) matches, iterated over an ordered rolesInMatchOrder slice. Adds anchored + resolve-level vectors incl. the negative `claude-haikuish-1` (the old loose match mis-matched to haiku). Mirrored in aikey-cli role_of_model for Go/Rust parity. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
pkg — providerroutes engine (shared)
model_map.Shared engine consumed by
aikey-proxyand the control plane.Part of the
model-mapping-egress-v1.0.4feature (7 repos)pkg·aikey-proxy·aikey-cli·aikey-config-tool·aikey-control·aikey-control-master(→develop-v1.0.4) androadmap20260320(docs →main).Verification status (honest)
claude-opus-4-8→ mappedglm-4.6→ GLM served → restored (streaming too); allTestLive_*pass with the real key.zhipu(declared anthropic → attributed zhipu), protocol=anthropic, base_urlopen.bigmodel.cn/api/anthropic, real message_id + token usage.aikey usetwo-axis summary +provider(s)mislabel fix — verified live against the real binary (newtests/e2e_use_two_axis_live.rs); PROTOCOL and PROVIDER render as separate columns (anthropic | zhipu(GLM)).🤖 Generated with Claude Code