-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat: feature-gate local inference dependencies #7976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jh-block
merged 15 commits into
aaif-goose:main
from
soilSpoon:feature/gate-local-inference
Mar 23, 2026
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
8491668
feat: feature-gate local inference dependencies behind `local-inference`
soilSpoon 877c499
fix: include Local provider in all_providers() and gate test_whisper …
soilSpoon a356b06
style: fix rustfmt import ordering for cfg-gated local-inference
soilSpoon a4763c4
fix: address PR review — keep cloud dictation unconditional, gate CLI…
soilSpoon 3545d65
merge: resolve conflict with origin/main in routes/mod.rs
soilSpoon 0545d61
feat: add /features endpoint exposing compile-time feature flags
soilSpoon f0c9bfb
chore: regenerate OpenAPI SDK with /features endpoint
soilSpoon 81f5ba7
feat: add FeaturesContext for server feature flag discovery
soilSpoon 0d96037
feat: wrap App with FeaturesProvider
soilSpoon 5fd2ec8
feat: hide local-inference UI when feature is disabled
soilSpoon 6448b52
fix: prevent blank panel when deep-linking to disabled local-inferenc…
soilSpoon 758e7aa
fix: add localInference to useEffect dependency array
soilSpoon e1a3430
fix: allow /features endpoint without authentication
soilSpoon da0fb81
fix: default localInference to false and reset tab when unavailable
soilSpoon f6b472f
fix: defer dictation provider reset until feature flags are loaded
jh-block File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| use axum::{routing::get, Json, Router}; | ||
| use serde::Serialize; | ||
| use std::collections::HashMap; | ||
| use utoipa::ToSchema; | ||
|
|
||
| #[derive(Serialize, ToSchema)] | ||
| pub struct FeaturesResponse { | ||
| /// Map of feature name to enabled status | ||
| pub features: HashMap<String, bool>, | ||
| } | ||
|
|
||
| #[utoipa::path( | ||
| get, | ||
| path = "/features", | ||
| responses( | ||
| (status = 200, description = "Compile-time feature flags", body = FeaturesResponse), | ||
| ) | ||
| )] | ||
| pub async fn get_features() -> Json<FeaturesResponse> { | ||
| let mut features = HashMap::new(); | ||
|
|
||
| features.insert( | ||
| "local-inference".to_string(), | ||
| cfg!(feature = "local-inference"), | ||
| ); | ||
| features.insert("code-mode".to_string(), cfg!(feature = "code-mode")); | ||
|
|
||
| Json(FeaturesResponse { features }) | ||
| } | ||
|
|
||
| pub fn routes() -> Router { | ||
| Router::new().route("/features", get(get_features)) | ||
| } |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.