feat: add LangChain media workflows over MCP - #504
Open
runshouse wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
Next step from PR triage: https://linear.app/magic-hour/issue/ENG-4839 contains the exact remaining evidence/release gates and acceptance checks. This is a documented handoff, not a claim that the remaining verification or publication is complete. |
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.
Adds runnable LangChain/LangGraph examples for product image generation, catalog image editing and photo animation through the existing hosted Magic Hour MCP server. Developers can optionally improve a prompt with a LangChain chat model, save the returned project ID before waiting, and resume a slow job without creating another paid generation. The runner downloads completed media without forwarding API credentials to the output URL.
Handles the MCP adapter's structured-result artifacts so multi-block completion responses preserve project data and exact signed URLs. Includes installation, cost/recovery instructions, a README entry and focused CI. This is example source, not a new SDK/package or an approved LangChain catalog integration. No web-product changes.
Validation: installed the actual LangGraph engine and MCP adapter; 11 tests passed through a local HTTP MCP server, covering all three workflows, schema constraints, preserved structured results, recovery without creation, terminal failures, missing downloads and ambiguous creation errors. A separate read-only production smoke check loaded 44 tools, received pong, and rejected an invalid account key with HTTP 401. Formatting and diff checks passed. Scope and engineering reviews completed separately. CI status is reported by the checks below.
Proof gaps: paid generation through this new LangChain example, a paid prompt-model call, hosted deployment and external publishing destinations were not executed. No new API credits were spent. LangChain catalog submission requires a separately published qualifying integration package, so none is claimed here.
After documentation release, measure first successful generation and repeat paid API usage from the tagged Developer Hub link. Remove the example from the index if its runtime compatibility or recovery behavior regresses.