Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/youtube/_base.py (Python)

Code before:
                'clientVersion': '2.20250925.01.00',
                # mweb previously did not require PO Token with this UA
                'userAgent': 'Mozilla/5.0 (iPad; CPU OS 16_7_10 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1,gzip(gfe)',
            },
        },
        'INNERTUBE_CONTEXT_CLIENT_NAME': 2,
        'GVS_PO_TOKEN_POLICY': {
            StreamingProtocol.HTTPS: GvsPoTokenPolicy(
                required=True,
                recommended=True,
                not_required_for_premium=True,
                not_required_with_player_token=False,
            ),
            StreamingProtocol.DASH: GvsPoTokenPolicy(
                required=True,
                recommended=True,
                not_required_for_premium=True,
                not_required_with_player_token=False,
            ),
            StreamingProtocol.HLS: GvsPoTokenPolicy(
                required=False,
                recommended=True,
            ),
        },
        'SUPPORTS_COOKIES': True,
        'SUPPORTS_AD_CONTEXT': True,
    },
    'tv': {
        'INNERTUBE_CONTEXT': {
            'client': {
                'clientName': 'TVHTML5',
                'clientVersion': '7.20250923.13.00',
                'userAgent': 'Mozilla/5.0 (ChromiumStylePlatform) Cobalt/Version',
            },
        },
        'INNERTUBE_CONTEXT_CLIENT_NAME': 7,
        'SUPPORTS_COOKIES': True,
        # See: https://github.com/youtube/cobalt/blob/main/cobalt/browser/user_agent/user_agent_platform_info.cc#L506
        'AUTHENTICATED_USER_AGENT': 'Mozilla/5.0 (ChromiumStylePlatform) Cobalt/25.lts.30.1034943-gold (unlike Gecko), Unknown_TV_Unknown_0/Unknown (Unknown, Unknown)',
    },
    'tv_downgraded': {
        'INNERTUBE_CONTEXT': {
            'client': {
                'clientName': 'TVHTML5',
                'clientVersion': '5.20251105',
                'userAgent': 'Mozilla/5.0 (ChromiumStylePlatform) Cobalt/Version',
            },
        },
        'INNERTUBE_CONTEXT_CLIENT_NAME': 7,
        'SUPPORTS_COOKIES': True,
    },

Review comment (suggestion):
Below, in `build_innertube_clients()`, you need to add this line:
```py
        ytcfg.setdefault('SUPPORTS_AD_CONTEXT', False)
```

Not sure about `SUPPORTS_AD_CONTEXT` as the name, though. It's not very obvious what it means, and it's not 1:1 with `adPlaybackContext`.

`SUPPORTS_AD_BYPASS` or `SUPPORTS_AD_PLAYBACK_CONTEXT` would be better

Code after:
                'clientVersion': '2.20250925.01.00',
                # mweb previously did not require PO Token with this UA
                'userAgent': 'Mozilla/5.0 (iPad; CPU OS 16_7_10 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1,gzip(gfe)',
            },
        },
        'INNERTUBE_CONTEXT_CLIENT_NAME': 2,
        'GVS_PO_TOKEN_POLICY': {
            StreamingProtocol.HTTPS: GvsPoTokenPolicy(
                required=True,
                recommended=True,
                not_required_for_premium=True,
                not_required_with_player_token=False,
            ),
            StreamingProtocol.DASH: GvsPoTokenPolicy(
                required=True,
                recommended=True,
                not_required_for_premium=True,
                not_required_with_player_token=False,
            ),
            StreamingProtocol.HLS: GvsPoTokenPolicy(
                required=False,
                recommended=True,
            ),
        },
        'SUPPORTS_COOKIES': True,
        'SUPPORTS_AD_PLAYBACK_CONTEXT': True,
    },
    'tv': {
        'INNERTUBE_CONTEXT': {
            'client': {
                'clientName': 'TVHTML5',
                'clientVersion': '7.20250923.13.00',
                'userAgent': 'Mozilla/5.0 (ChromiumStylePlatform) Cobalt/Version',
            },
        },
        'INNERTUBE_CONTEXT_CLIENT_NAME': 7,
        'SUPPORTS_COOKIES': True,
        # See: https://github.com/youtube/cobalt/blob/main/cobalt/browser/user_agent/user_agent_platform_info.cc#L506
        'AUTHENTICATED_USER_AGENT': 'Mozilla/5.0 (ChromiumStylePlatform) Cobalt/25.lts.30.1034943-gold (unlike Gecko), Unknown_TV_Unknown_0/Unknown (Unknown, Unknown)',
    },
    'tv_downgraded': {
        'INNERTUBE_CONTEXT': {
            'client': {
                'clientName': 'TVHTML5',
                'clientVersion': '5.20251105',
                'userAgent': 'Mozilla/5.0 (ChromiumStylePlatform) Cobalt/Version',
            },
        },
        'INNERTUBE_CONTEXT_CLIENT_NAME': 7,
        'SUPPORTS_COOKIES': True,
    },