Repository navigation
Yahoo Ads: Use bid.mtype and fix bid type on multi-format impressions - #4669
Open
MananRPatel wants to merge 5 commits into
Open
MananRPatel wants to merge 5 commits into
MananRPatel wants to merge 5 commits into
Conversation
On a banner+video impression the bidder labeled every bid as banner because it only looked at the impression. Read bid.mtype first, fall back to a VAST root tag check on adm when mtype is absent, and use the impression only when it offers a single format.
Open
7 of 18 tasks
added 3 commits
October 18, 2026 18:02
A bid with an mtype other than banner or video is now skipped with a badServerResponse error instead of being dropped silently; other bids in the response are kept. Tests are consolidated with shared helpers.
The VAST check finds a VAST element anywhere in adm, not only at the root, so drop "Root" from the test name.
XML names are case-sensitive and the VAST root element is always VAST, so drop the case-insensitive flag and the optional whitespace after "<". Align the markup tests: VAST after an XML declaration and with attributes on the next line is video; lowercase vast and a bare VASTAdTagURI are banner.
MananRPatel
marked this pull request as ready for review
October 21, 2026 18:33
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.
🔧 Type of changes
✨ What's the context?
This PR does two things in the Yahoo Ads bidder. The same code serves the
yssp,yahoosspandyahooAdvertisingaliases.Use
bid.mtype: Yahoo Ads SSP is addingbid.mtype(OpenRTB 2.6) to its responses. The bidder now reads it to set each bid's media type.Fix multi-format bids: today the bidder takes the type from the impression only and checks banner first. On an impression that offers both banner and video, every bid, including a VAST bid, is returned as
banner. Reading the type from the bid fixes this.🧠 Rationale behind the change
The bid type is now taken from the bid, in this order:
mtype: 1 is banner, 2 is video. Other values are not supported by this bidder, so the bid is skipped with abadServerResponseerror (Unsupported mtype <n> for bid '<id>') and the other bids are kept.mtype(null or 0) on a banner+video impression: a<VASTelement inadmmeans video, otherwise banner.mtypeon a single-format impression: the impression's format, as before.Unchanged: bids on impressions with neither banner nor video are skipped, and an unknown
impidstill fails withUnknown ad unit code. Changed: on a single-format impression, an audio or nativemtypenow skips the bid.🧪 Test plan
makeBidscases inYahooAdsBidderTestcover each rule above:mtypetaking precedence over the impression and over the markup, a zeromtypefalling back to the markup,<VASTafter an XML declaration and with attributes on the next line, the lowercase<vast>,<VASTAdTagURI>and<div>VAST</div>non-matches, a missingadm, and a banner-only impression with VAST markup staying banner.mtype3, 4 and 2 on the same impression: the first two are reported asbadServerResponseerrors with their error text, and themtype2 bid is still returned as video.makeHttpRequestscases also cover existing request-side branches that had no test: a video-only impression, a banner with onlywor onlyh, andregs.extfields kept after thegpppromotion.mvn testand checkstyle pass.🏎 Quality check
Companion change: prebid/prebid-server#5032 applies the same order to PBS-Go.
For contact: prebid-tech-team@yahooinc.com
Implemented with assistance from Claude Code.