Make web search and weather provider-agnostic (drop hard Bing/OpenWeather dependency)#8
Closed
Averroeskw wants to merge 2 commits into
Closed
Make web search and weather provider-agnostic (drop hard Bing/OpenWeather dependency)#8Averroeskw wants to merge 2 commits into
Averroeskw wants to merge 2 commits into
Conversation
Bing Web Search is retired (new Azure keys can't be created) and OpenWeather
One Call 3.0 now requires a paid key, so both services hard-fail on the
provider defaults. This makes each pluggable and adds keyless/self-hostable
options so a dead third-party key never bricks a tool.
Search (services/search.ts): SEARCH_PROVIDER selects searxng | brave | bing.
Auto-detects the first configured provider (SearXNG > Brave > Bing). Return
shape ({title, snippet}[]) is unchanged. Implements the intent of MaxMaeder#5 and MaxMaeder#2.
Weather (services/weather.ts): WEATHER_PROVIDER selects open-meteo (keyless,
new default) | openweather (legacy). WMO codes are mapped onto the existing
ConditionName set; return shape is unchanged. Addresses MaxMaeder#6.
.env.template documents the new variables. No behavior change for existing
Bing/OpenWeather deployments that set the provider explicitly.
… unknown values, add request timeouts, guard empty OWM conditions Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Author
|
Closing for now — pulling this back until I've verified the full stack end-to-end on the physical device (interposer inbound). Will reopen once it's hardware-verified. The branch lives on in my fork history if anyone needs the diff in the meantime. |
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
Two built-in tools currently hard-fail on defaults that are no longer freely available:
A stale/absent third-party key silently bricks the corresponding assistant tool.
What
Both services are now provider-selectable, with keyless / self-hostable options as defaults so the Pin keeps working with zero paid keys.
Search (
server/src/services/search.ts)SEARCH_PROVIDER=searxng|brave|bingsearxngneeds only a self-hosted URL (no key);braveusesBRAVE_KEY;bingunchanged{ title, snippet }[]is unchanged — no handler changes neededWeather (
server/src/services/weather.ts)WEATHER_PROVIDER=open-meteo(keyless, new default) |openweather(legacy)ConditionNamesetserver/.env.templatedocuments the new variables.Compatibility
SEARCH_PROVIDER=bing/WEATHER_PROVIDER=openweather(or just keep the keys; auto-detect prefers them where relevant).tsc --noEmitpasses for the changed files (pre-existingkeys/firebaseKeytemplate errors are unrelated).Implements the intent of #5, and directly addresses #2 and #6.