fix(dataflows): honour omitted optionals in the Alpha Vantage global-news path - #1329
Open
newnewself wants to merge 1 commit into
Open
fix(dataflows): honour omitted optionals in the Alpha Vantage global-news path#1329newnewself wants to merge 1 commit into
newnewself wants to merge 1 commit into
Conversation
…news path get_global_news marks look_back_days/limit optional and forwards None when the model omits them, but the Alpha Vantage implementation fed None straight into timedelta(days=...), raising TypeError. Because news_data is a core category the router re-raised it, aborting the news analyst instead of degrading. Resolve both from config, mirroring the yfinance path.
newnewself
force-pushed
the
fix/alpha-vantage-global-news-none
branch
from
September 12, 2026 08:53
3029c1c to
d7f8f8c
Compare
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.
Problem
get_global_newsdeclareslook_back_days/limitoptional (JSON-schema defaultnull) and forwards whatever it receives to the vendor.yfinance_newsresolvesNonefrom config; the Alpha Vantage path fed it straight intotimedelta:news_datais a core category (not inOPTIONAL_CATEGORIES), soroute_to_vendorre-raises instead of degrading — the news analyst call aborts whenever Alpha Vantage serves global news and the model omits the optional args (which the tool description presents as the normal, config-inheriting usage).Fix
Resolve both optionals from
global_news_lookback_days/global_news_article_limit, mirroringget_global_news_yfinance. Explicit values still win.Tests
tests/test_alpha_vantage_hardening.py: omitted args resolve from config (and produce the right window), explicit args still win.Full suite: 656 passed, 1 skipped.