Evaluating LLM Programming Capabilities: Tool Calling, Long-Horizon Tasks, and Model Selection
As Large Language Models (LLMs) transition from code completion to agent-level long-horizon task execution, evaluating their true programming capabilities requires looking beyond standard benchmark scores. This article explores practical methods for assessing LLMs in software engineering, focusing on tool calling stability, managing "thinking overload" in long-horizon tasks, and analyzing API cost-effectiveness. It also provides a cloud-native implementation checklist and enterprise selection guidelines based on real-world failure modes to help development teams make informed decisions.
The application of Large Language Models (LLMs) in software engineering has evolved from simple code completion to agent-level long-horizon task execution. Different models exhibit significant variations in coding capabilities, tool calling stability, and task execution efficiency. During model selection, relying solely on single benchmark scores can easily lead to misjudgments; instead, evaluation must incorporate failure modes from real-world business scenarios. This article discusses three key issues from a general technical perspective and provides actionable evaluation methods.
1. Parameter Errors and Repeated Calls in Tool Calling
In agent architectures, models must generate structured data (such as JSON) to call external tools, which requires high instruction-following capabilities. Even with engineering safeguards like JSON repair and fuzzy matching for parameter names, some models repeatedly generate incorrect call strings, manifesting as parameter name hallucinations, out-of-bounds enum values, or incorrect field types.
Tool call failures can be categorized and handled as follows:
- JSON syntax errors: Fixed by the parsing layer with a limit on repair attempts.
- Parameter name hallucinations: Validated via tool definition schemas, returning a clear error message directly.
- Enum value out-of-bounds: List valid values in the return result to reduce blind retries.
- Repeated calls: Perform semantic deduplication of complete calls, rather than just exact parameter matching.
- Insufficient permissions: Immediate termination and handoff to manual processing.
Repeated calls require special attention. If the system’s anti-duplicate rules only compare exact parameters, the model might bypass them with minor modifications. From the client’s perspective, these requests are valid, and simple parameter comparison cannot prevent them. This behavior usually indicates a lack of effective task planning, resulting in wasted compute power and tokens from invalid retries. Therefore, guardrails should check whether the call’s intent and return result show progress, and set a retry limit. Once the threshold is exceeded, the system should stop calling, record an audit log, and trigger an alert. For high-risk operations like writing, deleting, or publishing, a manual review step should be retained.
2. “Thinking Overload” in Long-Horizon Tasks
Thinking overload refers to the model spending a long time expanding hypotheses and candidate paths before starting execution, delaying the implementation phase. The model is not solving the problem but continuously expanding the problem space. Common triggers include vague task descriptions, overly long context, lack of a step budget, and missing clear end conditions.
Not all lengthy reasoning is problematic; complex refactoring does require upfront analysis. The criterion is whether the reasoning converges: if each reasoning round narrows down candidate solutions, the time spent is reasonable. If reasoning continuously generates new branches without concrete modifications, it is considered overload.
When evaluating this issue, avoid relying on personal impressions or marketing claims. Record the following data on a fixed task set:
- Time from task receipt to the first valid modification;
- Total time and token consumption per task;
- Number of tool calls;
- Final test pass rate.
The market often promotes that “models can work continuously for hours,” but runtime itself does not equate to output quality. For engineering teams, a more meaningful metric is the number of accepted modifications delivered per token or per minute.
Controlling overload can be approached from four angles: breaking large tasks into smaller steps; setting a maximum number of steps; detecting repetitive actions (e.g., performing the same operation for consecutive rounds); and early termination when conditions are met, outputting current progress and incomplete items. Additionally, alert thresholds should be set for single-task costs to prevent unbounded resource consumption.
3. API Pricing Changes and Cost-Effectiveness
In the early stages, some providers attracted developers with low-price token packages, giving them a clear price advantage for a period. As models iterate and computing costs rise, pricing among different providers has gradually converged. For pure text code generation, the extreme low unit-price advantage of the past is no longer significant in many scenarios.
Because prices change frequently, specific unit prices are not listed here. During model selection, consult the provider’s official pricing page directly, and record the query date and applicable region. Billing comparisons should include:
- Unit price of input and output tokens;
- Cache hit pricing and batch call discounts;
- Rate limits and concurrency caps;
- Billing methods for multimodal inputs or outputs.
When comparing different models, simply comparing unit prices is unreliable because output length and retry counts affect the total cost. A more reasonable metric is the cost per passed task, which can be estimated as follows:
Cost per passed task = (Input tokens × Input unit price + Output tokens × Output unit price + Additional costs from retries) ÷ Number of tasks that passed acceptance tests
This metric accounts for failed retries and manual rework, providing a cost closer to actual expenditure than unit price alone.
Multimodal capabilities also affect cost-effectiveness. If a team needs to process text, code, images, audio, or video on the same platform, unified integration may cost less than integrating multiple services separately. If the team only uses the model for backend code writing, they should primarily compare the cost per passed task for text and code.
4. Enterprise Selection Checklist and Cloud-Native Implementation
Before selection, it is recommended to test with task sets from real business scenarios and record at least the following metrics:
| Metric | Meaning | Observation Method |
|---|---|---|
| Tool call success rate | Proportion of calls with expected results | Classified statistics by failure type |
| Retry rate | Average retries per task | Tool call logs |
| Repeat call rate | Proportion of semantically identical calls | Deduplication analysis on call intent |
| P95 convergence time | Time required for 95% of tasks to complete | End-to-end time distribution statistics |
| Single task token consumption | Sum of input and output tokens | Data from billing or usage API |
| Cost per passed task | See formula in Part 3 | Calculated with test results |
| Manual rework rate | Proportion requiring manual edits before merging | Code review records |
| Multimodal coverage | Whether all required modalities are supported | Check against requirements list |
| Data compliance | Code/data storage, retention, and cross-border requirements | Audit against enterprise security policies |
In a cloud-native architecture, these metrics can be implemented using generic components. An API gateway handles multi-model routing, rate limiting, quotas, and circuit breaking to prevent a failing model from crashing the entire business. Object storage saves codebase snapshots, test sets, and context materials to facilitate reproducing test results. Log services record parameters, return codes, and token usage for each tool call, while monitoring systems set alert thresholds based on retry rates, P95 time, and single-task costs. These components are vendor-agnostic, allowing enterprises to choose implementations based on their environment.
5. Conclusion
First, evaluate models using the same set of real-world tasks, focusing on test pass rate, manual rework rate, and cost per passed task. Single benchmark scores and marketed runtime durations do not directly reflect engineering effectiveness.
Second, set retry limits, semantic deduplication, schema validation, and audit logs at the tool layer to contain the model’s anomalous loops within controllable bounds. The goal of guardrails is to stop invalid calls promptly and make the cause visible to humans.
Third, select models based on business needs. For pure code scenarios, comparing the cost per passed task is sufficient; teams with multimodal needs should also factor the engineering cost of unified integration into the total cost.
