import { parseGatewayStyleModelId } from "../llm/model-id.js";
export function buildModelMetaFromAttempt(attempt) {
    if (attempt.transport === "cli") {
        return { provider: "cli", canonical: attempt.userModelId };
    }
    const parsed = parseGatewayStyleModelId(attempt.llmModelId ?? attempt.userModelId);
    const canonical = attempt.userModelId.toLowerCase().startsWith("openrouter/")
        ? attempt.userModelId
        : parsed.canonical;
    return { provider: parsed.provider, canonical };
}
//# sourceMappingURL=model-meta.js.map