Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

OpenAI-compatible adapters forward allowed_tools upstream; upstreams that ignore it widen the tool choice

Open
#1,165 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
15/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
api, backend

Research direction

Start with the CompatibleProvider adapters and core.NarrowToAllowedTools, and compare them with how the Anthropic, Bedrock and Cohere adapters narrow tools after #1156. The first step is a per-provider check of which upstreams honor allowed_tools, and the issue leaves the choice between the three options open. Done means a decision on the option, a provider-level behavior change, and tests covering both narrowed and forwarded cases.

Written by the indexing model from the issue text.

Description

Follow-up to #1093 / #1156.

After #1156, an allowed_tools tool_choice reaches every chat-bridged provider in the Chat Completions shape, and each native adapter either maps it (Gemini, Vertex) or narrows the declared tools (Anthropic, Bedrock, Cohere). The OpenAI-compatible adapters (Groq, Ollama, Chutes, MiniMax, Bailian, EdenAI, OpenCode Go and the other CompatibleProvider users) forward the choice upstream unchanged, which is also what the Chat Completions path does today.

That's fine for an upstream that honors allowed_tools or rejects it with an error. For one that silently ignores an unknown tool_choice type, the original bug comes back one hop later: the model can call any declared function.

Options:

  1. Per provider, record whether the upstream supports allowed_tools, and narrow the declared tools (core.NarrowToAllowedTools) for the ones that don't.
  2. Always narrow for compatible adapters. That's safe everywhere, but it changes the tool list for upstreams that do support allowed_tools, which costs prompt-cache hits.
  3. Leave forwarding as the default and add a per-provider override.

Knowing which upstreams accept the field needs a check against each provider's API, so it is left out of #1156.

Dominant language
Go
Stars
1.2k
Forks
111
Avg merge
14h 43m
Merged PRs (30d)
142

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ENTERPILOT/GoModel

All issues in ENTERPILOT/GoModel

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.