Skip to content

Is the payment step for tools only, or does a model host get one too? #3060

Description

@TheCheetah11

Chainlit watches a model call with one module per SDK. The OpenAI one at backend/chainlit/openai/init.py wraps the client and turns every generation into a step named from generation.model or generation.provider, and the mistralai module does the same thing, with sibling modules for langchain, llama_index, semantic_kernel and langflow, so whatever host the app's own client points at is the host that ends up in the log. The docs pull request that noted the OpenAI client base_url pattern for multi-model gateways (#3009) was closed unmerged, and the issue opened on 25 September (#3059) asks for a native payment step when a Streamable HTTP MCP tool answers HTTP 402. Its alternatives section rules out asking every tool for a key on the grounds that it defeats the pay per call servers, which is the same wall the model side meets once the endpoint itself is the thing being paid for.

BlockRun is one OpenAI compatible base URL where chat, image, video, music, speech and sound effects share a single payment flow, and each call settles on its own in USDC over x402, so an app holds a wallet and no API key at all. https://blockrun.ai

So the question is whether a paid model host belongs in the same story as the paid tool, or whether the payment step is meant for the MCP path alone and a model call should stay a plain client call. If it belongs, I am glad to write it in the shape the step code already uses and open it for review, and just as happy to hear that the two should stay separate.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions