Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/cloudwaddie/aitweaker/llms.txt

Use this file to discover all available pages before exploring further.

The Google Labs tweaker targets two separate things: it can rewrite the MusicFX homepage link inside intercepted Next.js JavaScript bundles, and it can convert {"notFound":true} JSON responses into {"notFound":false} to bypass errors on labs.google/fx routes that would otherwise render a 404 page.

How it works under the hood

The proxy matches two URL patterns for Google Labs:
  • JS bundles: https://labs.google/fx/_next/static/chunks/pages/index-*.js
  • Data JSON: https://labs.google/fx/_next/data/*.json
When a JS bundle matches, the proxy does a direct string substitution:
proxy.py
original_link = "/tools/music-fx"
new_link = f"/{replacement}"

old_code_single = f"'link':'{original_link}'"
new_code_single = f"'link':'{new_link}'"
old_code_double = f'"link":"{original_link}"'
new_code_double = f'"link":"{new_link}"'
It tries the single-quote variant first, then the double-quote variant, replacing the first occurrence it finds.

notFound bypass

For JSON responses, the proxy converts the response body and also handles HEAD-to-GET conversion on the request side:
proxy.py
# Request side: convert HEAD to GET
if flow.request.method == "HEAD" and re.match(r"^https://labs\.google/fx/_next/data/.*\.json", flow.request.url):
    flow.request.method = "GET"

# Response side: replace notFound body
if flow.response.text == '{"notFound":true}':
    flow.response.text = '{"notFound":false}'

# Also handle 404 status codes
if flow.response.status_code == 404:
    flow.response.status_code = 200
    flow.response.text = '{"notFound":false}'
    flow.response.headers["Content-Type"] = "application/json"
HEAD-to-GET conversion happens at the request stage, before the response is received. This is required because Next.js sometimes pre-checks data routes with HEAD requests, and the mitmproxy response hook would never fire for a HEAD that gets a valid reply.

Setting up the Google Labs tab

1

Enable modifications

Toggle Enable Google Labs Modifications at the top of the tab. This is the master switch for both features on this tab.
2

Set the MusicFX replacement path

Enter a path into the Replace MusicFX Homepage Link field. The value you enter replaces /tools/music-fx in the intercepted JS. Do not include a leading slash — the proxy prepends one automatically.
Common working values are debug and notebook. These correspond to unreleased or internal paths in the labs.google/fx Next.js app. Try debug first.
The label underneath the field confirms the behaviour: “Replaces the ‘/tools/music-fx’ link with your own path (e.g., /debug).”
3

Enable the notFound bypass

Toggle Bypass ‘notFound’ errors. When on, any {"notFound":true} data response from labs.google/fx/_next/data/ is replaced with {"notFound":false}, and HEAD requests to those routes are promoted to GET so Next.js actually fetches the page data.
4

Save your changes

Click Save Google Labs Changes to write both settings to your active profile and regenerate rules.json.

Example configurations

Set Replace MusicFX Homepage Link to debug. The proxy will rewrite 'link':'/tools/music-fx' to 'link':'/debug' in the Next.js bundle.
If the replacement path you enter is not present in the current version of the labs.google JS bundle, the proxy will log Target for MusicFX link replacement not found. and leave the response unmodified. The notFound bypass is independent and will still apply.

Build docs developers (and LLMs) love