groundy
Agents & Frameworks

How to Evaluate Step 5 in LangChain Agents Before Routing Traffic

Evaluate Step 5 in LangChain agents using LangSmith comparisons against incumbents on versioned tasks before routing production traffic to the new model.

Published 6 references
On this page7 sections

Do not route production traffic to Step 5 because it appears in Vercel AI Gateway. Treat stepfun/step-5 as an available candidate, then earn a limited trial with a LangSmith comparison against your incumbent on the same versioned tasks. The evidence needed is specific: matching dataset input keys, identical tool permissions, a fully specified output contract, goal completion across all runs, tool failures, redundant calls, retries, latency per completed task, and cost per completed task using dated pricing assumptions. Keep failed runs and their consumption in the results. Vercel’s changelog establishes availability and a model identifier; it does not establish how the model will perform in your agent.

That distinction determines the decision. A gateway listing can start an evaluation, but only comparable task evidence can justify shifting traffic.

What the Step 5 changelog establishes

Vercel announces that Step 5 from StepFun is available through AI Gateway and gives stepfun/step-5 as the model name. That is enough to make it a concrete routing candidate rather than an unspecified upcoming release.

The rest of the announcement needs careful attribution. Vercel positions Step 5 for agentic work including coding, research, long reports, web design and interactive applications, with application tools helping carry long tasks to completion. Vercel also reports that Step 5 uses fewer tokens than Step 5 Preview on complex tasks, adds video input alongside text and images, and provides a 1M-token context window. These are vendor-reported capabilities, not independent measurements of Step 5 against your incumbent.

They supply useful hypotheses for an evaluation, not its result. In particular, fewer tokens than Step 5 Preview does not mean fewer tokens per completed task than your current model. A model can use fewer tokens on an unsuccessful attempt, or save tokens per attempt while requiring more retries. Neither result would necessarily reduce the cost of completed work.

The same changelog says AI Gateway reflects provider pricing without markup and charges no platform fee on inference, including Bring Your Own Key requests. Those terms simplify the pricing question, but they do not answer it. The available evidence contains no Step 5 token price, no measured token consumption for your tasks, and no workload-level cost estimate. Record the provider prices and account terms used for each evaluation run, and recheck them before a routing decision.

Build a comparison that can survive a disputed result

LangSmith provides a suitable evaluation surface because LangChain Runnable objects, including chat models, retrievers and chains, can be passed directly to evaluate() or aevaluate(). Once your integration can select the incumbent and Step 5, evaluate the agent as a Runnable rather than comparing isolated model responses. The object under test is the agent configuration that will actually receive traffic.

The comparison should hold these conditions constant:

  • Dataset version: both configurations receive the same task examples, including known failures and difficult cases.
  • Input keys: the chain’s input variables match the dataset example keys exactly.
  • Tool permissions: both configurations can attempt the same operations under the same restrictions.
  • Output contract: required fields, success criteria and representations are explicit.
  • Evaluation criteria: the same definition of completion and failure applies to both.

The key-matching requirement is mechanical, not cosmetic. LangSmith’s Runnable documentation explicitly requires the chain’s input variables to match the keys of the example inputs. Treat a mismatch as a harness defect. Do not interpret the resulting run as evidence that either model is worse at the task.

Sometimes a model candidate requires a different prompt, adapter or tool-calling configuration. That changes the comparison. Evaluate the complete working configuration against the incumbent, version the changed components, and describe the result as an agent-configuration comparison rather than an isolated model effect. Quietly giving one side extra instructions or different permissions would destroy the comparison you intended to run.

The output contract deserves the same discipline. In a 30-task coding-agent benchmark, a companion experiment omitted the required ranking key and unit representation from the instructions. The paper reports that this under-specified contract understated one condition, condition C, by 23.4 points. That result comes from a particular benchmark and condition; it is not a predicted Step 5 effect. It does show that evaluator and contract design can dominate measured agent error.

For your own tasks, state whatever the evaluator will actually require. If an answer must be ranked, name the ranking key. If quantities must use a particular representation, specify it. If completion depends on structured fields or a final state, encode those requirements before running either model. Otherwise, the experiment may rank your harnesses rather than the models.

Score completed work, not pleasant-looking runs

The primary metric should be goal completion. A compendium of agent criteria and metrics defines goal completion rate as the percentage of tasks on which an agent achieves the intended goal. Keep every attempted task in the denominator, including runs that ended in tool errors or invalid output.

Tool behavior needs separate accounting because a completed-task average can conceal how close the agent came to failure. The same paper describes tool hallucination as calling non-existent functions or fabricating tool results, leading to execution errors. It also identifies redundant tool calls as a source of unnecessary token consumption. Those are different problems: one threatens correctness, while the other can make otherwise successful work unnecessarily expensive.

Use a scorecard with explicit denominators:

Decision axisWhat to record for each configurationRouting question
Goal completionCompleted tasks divided by all attempted tasks, with results retained for important task slicesDoes Step 5 meet a predeclared completion floor and an acceptable delta against the incumbent?
Tool failuresInvalid or non-existent calls, fabricated results, affected tasks and the tools involvedAre failures understood and acceptable for the permissions this traffic would grant?
Redundant calls and retriesAttempts per task, repeated work, redundant calls and retries after failureIs an apparent quality gain being purchased with overhead that production cannot afford?
LatencyEnd-to-end timing for successful and failed attempts, with failed-attempt time visibleDoes completed-work latency fit the workload’s limit without hiding slow failures?
CostModel usage and spend across successful and failed runs, divided by completed tasksDoes cost per completed task fit the budget under the recorded provider-price assumptions?
Comparison fidelityDataset version, key matching, permissions, output contract and configuration versionsDid both sides receive a comparable test, or must the run be discarded and repeated?

Two accounting choices matter here. First, calculate cost per completed task from the consumption of the whole evaluation run, not just the successful runs. Failed attempts still consume resources. Second, preserve per-task outcomes alongside aggregates. A model with similar average cost can have a very different failure pattern, and that difference may determine whether a task is suitable for automation.

There is no evidence-backed universal threshold for these metrics. Set acceptable deltas before seeing the results, based on the work being routed. I would not trade lower completion on critical or difficult-to-reverse tasks for cheaper tokens. For reversible work with dependable failure handling, a different tradeoff may be reasonable, but it should be an explicit risk decision rather than an accidental consequence of an average.

Retries also need an implementation warning. Retry budget is a studied evaluation variable in the coding-agent benchmark’s title and design, but the supplied LangSmith passages do not identify specific API fields for retry counts. Define what constitutes a retry in your harness, retain attempt-level records, and verify current LangSmith documentation before assuming a field will produce this metric automatically.

What would justify a limited traffic shift?

A strong offline result justifies a limited production test, not immediate adoption. LangSmith’s evaluation documentation distinguishes offline and online evaluation and describes scoring outputs against datasets and criteria to benchmark versions, catch regressions and track quality over time. It also supports adding real traces to a dataset, turning an observed production failure into a repeatable test.

That suggests a practical gate:

  1. Freeze the comparison. Confirm the dataset version, matching keys, tool permissions, output contract and evaluator before running Step 5.
  2. Review the whole scorecard. Require your predeclared completion, tool-failure, retry, latency and cost conditions to pass. Inspect failed runs instead of allowing averages to absorb them.
  3. Resolve pricing and integration unknowns. Recheck provider pricing, Step 5 availability and the current LangChain-to-Gateway connection. Verify Vercel’s actual routing configuration in a non-production deployment rather than inferring it from the changelog.
  4. Define the production exit condition. Decide which observed regression ends the trial and restores the incumbent route.
  5. Monitor the limited shift. LangSmith says its platform can track cost, latency, errors and tool behavior in production agent runs. Compare those observations with the offline assumptions.
  6. Feed failures back into the dataset. A failure found during the trial should become a regression case for subsequent model or agent versions.

Do not confuse gateway products while designing these controls. LangSmith separately describes an LLM Gateway that controls model calls, spend and sensitive data and can require human approval for sensitive agent actions. The supplied evidence does not establish that those controls configure or govern Vercel AI Gateway. If your rollout depends on an approval step or a spending restriction, verify which component implements it.

The available research also does not document Vercel’s traffic-splitting mechanics or the exact LangChain-to-Gateway wiring. That missing documentation is a deployment task, not a detail to guess. Until it is resolved, an offline Step 5 win is evidence for further testing, not assurance that a production route is safe.

The decision

Evaluate Step 5 now if it is a plausible candidate, but keep production traffic with the incumbent until the same-task gate passes. If Step 5 regresses on critical task completion, stop there even if its token consumption looks attractive. If it improves completion but exceeds your retry, latency or cost budget, it has not passed. If it wins offline while pricing, retry accounting or routing mechanics remain unresolved, keep the traffic shift on hold.

This process cannot tell you whether Step 5 is generally superior, because the available evidence contains no independent Step 5 benchmark and no measurement on your tasks. It can answer the more useful operational question: whether a specific, versioned LangChain agent configuration completes your work acceptably under your permissions and economics. That is the evidence a routing decision should require, for Step 5 and for the next model added to the gateway.

Frequently Asked Questions

What does the Vercel changelog establish about Step 5?

Vercel announces that Step 5 from StepFun is available through AI Gateway and gives stepfun/step-5 as the model name. That is enough to make it a concrete routing candidate rather than an unspecified upcoming release.

References

Follow the links in the article for context. The supporting material is collected here for further reading.

  1. Step 5 now available on AI Gatewayvercel.comAccessed
  2. LangChain Runnabledocs.langchain.comAccessed
  3. 30-task coding-agent benchmarkarxiv.orgAccessed
  4. Compendium of agent criteria and metricsarxiv.orgAccessed
  5. LangSmith Evaluationdocs.langchain.comAccessed
  6. LangSmith Platforminfo.langchain.comAccessed

Join the discussion

Share a useful perspective or ask a question about this article.

Discussion guidelinesComments privacy