Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Support max_completion_tokens (alias or replacement for max_tokens) in Agents API

Aperta
#287 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api, backend

Direzione di ricerca

Start by locating the Agents API sampling_params schema and the code that builds tool-calling or agent-invocation requests. Check how max_tokens is currently serialized, then add support for max_completion_tokens while preserving the stated backward-compatibility behavior. Done means supported OpenAI/Azure-style models no longer receive an unsupported max_tokens parameter, with tests covering the request payload.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I’m building agents using the Agent API of the Python SDK and am using OpenAI's models (GPT-5-mini) where the provider rejects the max_tokens parameter and requires max_completion_tokens.

The current sampling_params schema for the Agents API only supports max_tokens, so when I attempt a tool-calling turn or agent invocation I get errors like:

400 BadRequestError: Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.

To ensure the SDK works with newer provider models (OpenAI/Azure etc), would it be possible to add support for max_completion_tokens in sampling_params for the Agents API, or optionally, alias max_tokens with max_completion_tokens for backward compatibility (although there could be issues with this).

Happy to assist with a pull request if helpful.

Lingua principale
Python
Stelle
198
Fork
102
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ogx-ai/ogx-client-python

Tutte le issue di ogx-ai/ogx-client-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.