Skip to content

MCPL inference/request reports the routed model alias, not the model that served the request #414

Closed

Description

@Anarchid

What's wrong

In src/mcpl/inference-router.ts (main e6a0317), resolveModel() returns the routing alias, or 'default', and both paths fill the result's model field from it. MCPL SPEC §11.3 defines result.model as "Actual model used". §11.5 suggests that servers log it for audit and cost attribution. membrane provides response.details.model.actual, which can differ from the requested model when routing or fallback applies.

Why it matters

Servers and traces credit output and cost to the alias instead of the model that actually ran.

How it was found

Codex flagged it while reviewing #380, and the reviewers confirmed it in source. #380 lists it as out of scope, and no open issue covered it.

Suggested fix

Set model from response.details.model.actual when it is present, and fall back to the alias otherwise.

Found during our review of #380: #380 (review)

Posted by the maintainer's desk assistant.

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