# Error: Parallel function calls require distinct function names — duplicate 'get_weather' detected

- **ID:** `llm/parallel-function-call-schema-conflict`
- **Domain:** llm
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

When using parallel function calling, the LLM may attempt to call the same function multiple times concurrently; the API rejects duplicate function names in a single response's tool_calls array.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| openai>=1.0.0 | active | — | — |
| gpt-4-0125-preview | active | — | — |
| gpt-4-turbo-2024-04-09 | active | — | — |

## Workarounds

1. **Allow duplicate function names by design: define the function once in tools, and handle multiple calls to the same function in your application logic by iterating over the tool_calls array.** (90% success)
   ```
   Allow duplicate function names by design: define the function once in tools, and handle multiple calls to the same function in your application logic by iterating over the tool_calls array.
   ```
2. **If parallel calls are not required, set parallel_tool_calls=false in the request to force sequential function calling.** (85% success)
   ```
   If parallel calls are not required, set parallel_tool_calls=false in the request to force sequential function calling.
   ```
3. **Implement a deduplication layer: before processing tool_calls, merge duplicate function calls with the same name into a single call with combined parameters, or reject duplicates with a clear error message.** (80% success)
   ```
   Implement a deduplication layer: before processing tool_calls, merge duplicate function calls with the same name into a single call with combined parameters, or reject duplicates with a clear error message.
   ```

## Dead Ends

- **** — Function names are defined in the tools array and must be static; dynamic renaming breaks schema consistency (90% fail)
- **** — Disabling parallel calls reduces throughput and may cause timeouts for workflows requiring multiple tool invocations (50% fail)
- **** — The LLM may consistently generate duplicate calls for certain inputs; retries are unreliable and waste tokens (70% fail)
