Two modes for client helper requests: answer locally or forward - #281
Merged
Merged
Conversation
`client_probes` had three modes, and two of them did the same thing: `passthrough` and `route` both sent the request through the routing rules, and differed only in whether it carried its class, so whether a `when.intent` rule could match it. The names suggested that `passthrough` skipped routing, and the dry run said so too, while the gateway evaluated the rules for it like for any other request. They are now one mode, `forward`: the request goes through the rules and carries its class, so an `intent` rule takes effect as soon as it is written. `intercept` is unchanged and still the default for health checks and warm-ups; the other three default to `forward`. - ProbeAction / ProbeMode: `intercept` | `forward` - Dry run: only intercepted requests short-circuit; `passthrough` outcome removed - RouteSave.route_probes removed (it existed to switch classes to `route` so a new intent rule would fire), with the `control.unknown_probe_class` code - CONTROL_API_VERSION 36 - Config manual updated; `passthrough` / `route` in an existing config are now validation errors Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Why
client_probeshad three modes, and two of them did the same thing.passthroughandrouteboth sent the request through the routing rules; they differed only in whether the request carried its class, i.e. whether awhen.intentrule could match it. The names suggestedpassthroughskipped routing, and the dry run said so too (it short-circuited with apassthroughoutcome and evaluated no rules), while the gateway evaluated the rules for it like for any other request.What
One mode,
forward, replaces both: the request goes through the rules and carries its class, so anintentrule takes effect as soon as it is written.interceptis unchanged and remains the default for health checks and warm-ups; titling, topic detection and suggestions default toforward.ProbeAction/ProbeMode:intercept|forwardpassthroughoutcome is goneRouteSave.route_probesremoved (it existed to switch classes torouteso a new intent rule would fire), together with thecontrol.unknown_probe_classmessage codeCONTROL_API_VERSION36passthrough/routein an existingconfig.yamlare now validation errors (no compatibility path, per project policy).Tests
cargo fmt --all --check,cargo clippy --workspace --all-targets -D warnings,cargo test --workspaceall pass locally. Dry-run tests now cover a forwarded probe being evaluated by the rules and an intent rule catching it; the gateway test sends a forwarded titling request to the cheaper upstream without any extra setting.🤖 Generated with Claude Code