Repository navigation
docs: reduce oversized pages and prevent full OpenAPI markdown dumps - #1271
Open
ethanfinkel wants to merge 1 commit into
Open
ethanfinkel wants to merge 1 commit into
ethanfinkel wants to merge 1 commit into
Conversation
Contributor
✅ Preview approved@kenrogers approved a Mintlify preview for commit |
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
This branch was successfully deployed
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.
Summary
Coding agents frequently hit fetch truncation limits (~50 KB) when reading key OpenRouter documentation pages and OpenAPI reference endpoints, causing them to miss routing options (
require_parameters,quantizations,data_collection,zdr,max_price), tool calling patterns, endpoint schemas, or skip the Models API entirely out of concern that the payload is too large.This PR addresses four root causes without removing any technical documentation or breaking existing anchors:
Prevent Mintlify from dumping the full 2.36 MB OpenAPI spec on API Reference
.mdpages (docs.json,guides/features/decisions.mdx)"markdown": { "schema": false }indocs.jsonso Mintlify omits the raw monolithicopenapi.yamldump (all tags, provider enums, and 1,082 schemas) from agent-facing Markdown exports while keeping endpoint documentation intact.markdown.instructionshint pointing agents to targeted single-model and filtered catalog endpoints (GET /api/v1/model/{author}/{slug},GET /api/v1/models/{author}/{slug}/endpoints, and filteredGET /api/v1/models).answersunion types,annotations, andusage) and thetracerequest field toguides/features/decisions.mdx.Compact
guides/routing/provider-selection.mdxfrom 130.8 KB → 42.2 KB (-67.7%)OutputJSON dumps (34.8 KB total, including 4–6.4 KB base64encryptedContentblobs for"Hello"responses).<CodeGroup>on the first example (Provider Sorting) and theTypeScript SDK+cURLheader example (Anthropic Beta Features), replaced the other 18 repetitive HTTP boilerplate blocks with focusedjsonrequest-body snippets, and documented TypeScript SDKcamelCasefield names in the summary table.<QuantizationLevels />, and<TermsOfServiceDescriptions />.Compact oversized Tool Calling & Responses guides under ~41 KB
guides/features/tool-calling.mdx: 60.2 KB → 40.4 KB (-32.9%) — kept all Agent SDK, Responses/Chat Completions JSON, TypeScript SDK, and Python examples; trimmed duplicatedTypeScript (fetch), verbose Go, andjqbash loops from the walkthrough and streaming sections.api_reference/responses/tool-calling.mdx: 54.1 KB → 32.9 KB (-39.3%) — removed 4 truncated 42-lineOutputdumps and replaced 4 repeated 4-language boilerplate sections (Force Specific Tool,Disable Tool Calling,Multiple Tools,Parallel Tool Calls) with concise JSON request/output examples.api_reference/responses/web-search.mdx: 66.5 KB → 32.0 KB (-52.0%) — removed 5 truncated 6.9 KBencrypted_contentOutputdumps.agent-sdk/call-model/text-generation.mdx: 50.7 KB → 38.8 KB (-23.4%) — compacted an 8 KB single-lineencrypted_contentOutputdump and a 4.5 KB story dump.Surface single-model & filtered Models API queries prominently
guides/overview/models.mdx: 37.3 KB → 32.0 KB (-14.3%) — added a top<Tip>explaining how to avoid the ~200 KB+ unfiltered catalog (GET /api/v1/model/{author}/{slug},GET /api/v1/models/{author}/{slug}/endpoints, and?q=...&limit=...), added the full query-parameter summary table (q,limit,offset,min_price,max_price,context,zdr,region,arch,input_modalities), and replaced two giant truncatedOutputdumps (including a…[192000 chars clipped]…blob) with clean JSON examples.api_reference/models.mdx: Added a matching<Tip>at the top of the page.openapi/openapi.yaml: Added a concise operationdescriptiononGET /modelsrecommending query filters or single-model lookup to keep payloads small.Size Comparison
guides/routing/provider-selection.mdxapi_reference/responses/web-search.mdxapi_reference/responses/tool-calling.mdxguides/features/tool-calling.mdxagent-sdk/call-model/text-generation.mdxguides/overview/models.mdxguides/features/decisions.mdxapi_reference/models.mdxValidation
mint validate --no-build --format json: passed with 0 errors.<CodeGroup>tags, validdocs.json, and all internal and cross-document anchor links.