github / github/copilot-cli

Ollama Cloud Does Not Support custom_tool_call Payload Used by Copilot CLI

Aberta
#3,839 1 comentário 8 reações 0 responsáveis Ver no GitHub
area:agents area:models
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

## Summary

When using Copilot CLI v1.0.63 in **Fleet Mode** with a BYOK model routed through Ollama Cloud, requests may fail with the following error:

```text
400 litellm.BadRequestError: OpenAIException - {"error":{"message":"input[69]: unknown input item type: \"custom_tool_call\"","type":"invalid_request_error","param":null,"code":null}}

Received Model Group=glm-5.2:cloud
Available Model Group Fallbacks=None
```

The failure does not appear to be model-specific.

Instead, the request generated by Copilot CLI Fleet Mode contains a `custom_tool_call` input item type that Ollama Cloud currently does not support.

## Environment

* Copilot CLI
* Fleet Mode enabled
* BYOK Provider: Ollama Cloud
* Gateway: LiteLLM
* Example Model: `glm-5.2:cloud`

## Actual Behavior

When Fleet Mode invokes tools or agent workflows, Copilot CLI sends one or more `custom_tool_call` items within the request payload.

Ollama Cloud rejects the request with:

```text
unknown input item type: "custom_tool_call"
```

The request is rejected before reaching model inference.

## Expected Behavior

One of the following should happen:

* Ollama Cloud supports the `custom_tool_call` input type used by Fleet Mode.
* Copilot CLI detects that the target provider does not support `custom_tool_call` and falls back to a compatible format.
* Copilot CLI provides a configuration option to disable Fleet-specific tool payloads for OpenAI-compatible providers with limited feature support.

## Reproduction

1. Configure Copilot CLI to use a BYOK model through LiteLLM.
2. Configure LiteLLM to route requests to Ollama Cloud.
3. Enable Fleet Mode.
4. Execute a prompt that triggers agent or tool execution.
5. Observe the following error:

```text
400 litellm.BadRequestError: OpenAIException - {"error":{"message":"input[69]: unknown input item type: \"custom_tool_call\"","type":"invalid_request_error","param":null,"code":null}}
```

## Notes

Based on the error message, the request appears to be rejected by the Ollama Cloud API compatibility layer before reaching the underlying model.

This suggests the issue is related to Fleet Mode request formatting and provider capability compatibility rather than the specific model being used.

Any model hosted through Ollama Cloud may be affected when Fleet Mode emits `custom_tool_call` payloads.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Start by tracing the Fleet Mode request path that emits custom_tool_call items and how provider capabilities are handled for Ollama Cloud through LiteLLM. Reproduce the failure with the documented BYOK setup, then define completion as a compatible request path or an explicit provider fallback that avoids the rejected payload.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
ollama
Domínio
api, cli, cloud
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Pouca atividade
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.