Repository navigation
fix(mcp): leave the media type out when the URL has no known extension - #102
Merged
Merged
Conversation
Contributor
Author
pr-review (fresh context): APPROVEChecked: diff at 84e6334, the API side in Schedule-Posts-API (create.ts rehost then Correctness
Notes (non-blocking)
Verdict: APPROVE. |
The MCP servers sent type "image" for any media URL without a video, gif or pdf extension, so a Google Drive link to an MP4 went out as an image. The API then rehosts the Drive file as .mp4 and rejects the explicit image type on create, and validate runs the TikTok image check on it. Media items are now typed only when the extension proves it (video, gif, document, image); any other URL is sent without type and the API infers it. One helper serves the ChatGPT server and posts_create/posts_cross_post.
Zernio-Elean
force-pushed
the
fix/mcp-untyped-unknown-extension
branch
from
November 18, 2026 14:59
990bc7a to
1a0e0c6
Compare
Zernio-Elean
force-pushed
the
fix/mcp-untyped-unknown-extension
branch
from
November 18, 2026 15:05
1a0e0c6 to
4a6b47c
Compare
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.
Why
The ChatGPT connector (and
posts_create/posts_cross_post) senttype: "image"for any media URL without a known extension. A Google Drive link to an MP4 went out as an image: the API rehosts it as.mp4and rejects the image type on create ("Media type mismatch"), and validate runs the TikTok image check ("unrecognized file format"). Customer report: Crisp session_d8f442e1, SUP-2031.What
late/mcp/media_items.pymedia_item(url): typed only when the path extension proves it (video, gif, pdf as document, known image extensions); any other URL is sent withouttype, which the API infers (documented in createPost).chatgpt_server._media_items,server.posts_createandserver.posts_cross_postuse it.server.pynow matches the path suffix instead of a substring (soa.movie.com/x.jpgis no longer sent as video).server.pytools checked on the outgoing request body.