Skip to content

Insticator Bid Adapter: Add support for 2.6rtb request/response#14373

Merged
patmmccann merged 8 commits intoprebid:masterfrom
Insticator:update-insticator-for-2.6rtb
Feb 26, 2026
Merged

Insticator Bid Adapter: Add support for 2.6rtb request/response#14373
patmmccann merged 8 commits intoprebid:masterfrom
Insticator:update-insticator-for-2.6rtb

Conversation

@shubhamc-ins
Copy link
Contributor

Type of change

  • Bugfix

  • Feature

  • New bidder adapter

  • Updated bidder adapter

  • Code style update (formatting, local variables)

  • Refactoring (no functional changes, no api changes)

  • Build related changes

  • CI related changes

  • Does this change affect user-facing APIs or examples documented on http://prebid.org?

  • Other

Description of change

Other information

Copilot AI review requested due to automatic review settings January 23, 2026 11:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for OpenRTB 2.6 request/response fields and video ad-pod handling to the Insticator Bid Adapter. The changes enable the adapter to handle advanced video advertising use cases including ad pods with sequential ads.

Changes:

  • Added support for ORTB 2.6 ad-pod video parameters (podid, podseq, poddur, slotinpod, mincpmpersec, maxseq, rqddurs)
  • Enhanced response handling to map ORTB 2.6 fields (category, seat/dsp, creative attributes, deal ID, billing/notice URLs, video duration)
  • Added publisherId query parameter support for endpoint URLs
  • Updated TTL logic to use MAX of bid.exp and configured BID_TTL

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
modules/insticatorBidAdapter.js Added ORTB 2.6 video ad-pod parameter validation, request mapping for ad-pod fields, response mapping for new ORTB 2.6 fields, and publisherId query parameter handling
test/spec/modules/insticatorBidAdapter_spec.js Added comprehensive test coverage for publisherId query parameters, ad-pod video parameters, ORTB 2.6 response field mapping, and edge cases for empty responses

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 723 to 728
const publisherId = deepAccess(validBidRequests[0], 'params.publisherId');
if (publisherId) {
const urlObj = new URL(endpointUrl);
urlObj.searchParams.set('publisherId', publisherId);
endpointUrl = urlObj.toString();
}
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The publisherId check on line 724 does not filter out empty strings. When publisherId is an empty string, it will still be added as a query parameter. Based on the test on line 838-848, empty strings should not be included in the URL.

Copilot uses AI. Check for mistakes.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e09f726566

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 501 to 504
// TTL: Use MAX of bid.exp and BID_TTL to ensure minimum 5 minutes
const configTTL = config.getConfig('insticator.bidTTL') || BID_TTL;
const bidExp = bid.exp || 0;
const ttl = Math.max(bidExp, configTTL);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Honor bid.exp as an upper TTL bound

When the exchange includes bid.exp, OpenRTB treats it as the maximum time (seconds after the auction) that the bid is valid. Using Math.max(bid.exp, configTTL) can extend TTL beyond what the bidder allowed (e.g., exp=60 becomes ttl=300), which risks serving expired creatives and violating bidder contracts. This is introduced by the new MAX logic; consider using Math.min or otherwise treating bid.exp as an upper bound so shorter expirations are respected.

Useful? React with 👍 / 👎.

Comment on lines 153 to 155
const durationRangeSec = deepAccess(bidRequest, 'mediaTypes.video.durationRangeSec');
if (durationRangeSec && isArrayOfNums(durationRangeSec) && durationRangeSec.length > 0) {
optionalParams['rqddurs'] = durationRangeSec;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate durationRangeSec values before mapping

durationRangeSec is mapped directly to rqddurs with only isArrayOfNums checks, which allows zero or negative values through. That bypasses the adapter’s own validation rule for rqddurs (positive-only in OPTIONAL_VIDEO_PARAMS) and can send invalid ORTB 2.6 requests when publishers misconfigure ranges (e.g., [0, -15]). Consider reusing the rqddurs validator or filtering out non-positive entries before assignment.

Useful? React with 👍 / 👎.

@coveralls
Copy link
Collaborator

coveralls commented Jan 23, 2026

Pull Request Test Coverage Report for Build 21300423597

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 212 of 212 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 96.219%

Totals Coverage Status
Change from base Build 21265604449: 0.004%
Covered Lines: 208945
Relevant Lines: 217155

💛 - Coveralls

@shubhamc-ins
Copy link
Contributor Author

Hey @ncolletti, just checking in. Have you had a chance to review this PR?

Thanks!

'pos': (value) => isInteger(value) && [0, 1, 2, 3, 4, 5, 6, 7].includes(value),
'api': (value) => isArrayOfNums(value)};
'api': (value) => isArrayOfNums(value),
// Ad Pod specific parameters (ORTB 2.6)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're not supporting the adpod mediatype above, however we're getting rid of it in 11

Copy link
Contributor Author

@shubhamc-ins shubhamc-ins Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patmmccann thanks for checking. Okay I see

Is there any document I can refer to check, and see what fields are being removed from bidrequest/response related to ad pod? Or in general too.

Thank you

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you have customers using the adpod media type? we're just deleting it altogether in #14451

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the sharing the PR.
If I understand correct, we need to remove the adpod mediatype mappings. I've removed the Prebid adpod field mappings (adPodDurationSec → poddur, durationRangeSec → rqddurs) from the adapter. The remaining params (poddur, rqddurs, podid, etc.) are kept as standard ORTB 2.6 video fields that can be passed directly.

Please let me know, if I missed anything.
@patmmccann

@patmmccann patmmccann changed the title Insticator Bid Adapter: Add support for 2.6rtb request/response and video ad-pod handling Insticator Bid Adapter: Add support for 2.6rtb request/response Feb 26, 2026
@patmmccann patmmccann merged commit ec41457 into prebid:master Feb 26, 2026
101 of 102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants