Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Python ModelLimits drops max_output_tokens from model metadata

オープン 初心者向け
#2,798 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
api

調査の方向性

公開されている Python の ModelLimits 型とその from_dict() および to_dict() メソッドから始め、CopilotClient.list_models() がモデルの制限をどのようにデシリアライズするかを追跡します。提示された例を再現し、デシリアライズ時に max_output_tokens が保持され、シリアライズされたモデルメタデータに含まれることを確認します。

索引モデルが issue の本文から書いたものです。

説明

bug

Description

The generated RPC schema includes max_output_tokens in ModelCapabilitiesLimits, but the public Python ModelLimits type does not. CopilotClient.list_models() deserializes model limits through ModelLimits.from_dict(), so the value is discarded.

This follows the same schema/public-type parity principle addressed for TypeScript in #2569, although this issue affects the Python model-list response path rather than the session override path.

Reproduction

from copilot import ModelLimits

limits = ModelLimits.from_dict(
    {
        "max_prompt_tokens": 128000,
        "max_output_tokens": 16384,
        "max_context_window_tokens": 144384,
    }
)

assert limits.max_output_tokens == 16384
assert limits.to_dict()["max_output_tokens"] == 16384

Currently, ModelLimits has no max_output_tokens attribute and to_dict() omits the field.

Expected behavior

ModelLimits should preserve max_output_tokens when deserializing and serializing model metadata.

主要言語
TypeScript
スター
10.5k
フォーク
1.5k
平均マージ
1日 6時間
マージ済み PR(30日)
106

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/copilot-sdk のほかの issue

github/copilot-sdk の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。