[BUG] OpenAI Compatible: Context Window Size resets to 128000 for unknown models

オープン
#2,774 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
node.js, typescript, vscode

調査の方向性

Start by reproducing the steps in Settings and Model Configuration using the provided OpenAI-compatible gateway and an unknown model ID. Trace where the unknown-model fallback sets contextWindow to 128000 and where custom model profiles are saved. Done means the configured context window persists after saving and switching profiles; support for reading /v1/models would require using its context_length value.

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

説明

Describe the bug
The Context Window Size resets to 128000. This happens with models that Zoo Code does not know. I use the OpenAI Compatible provider with a gateway. Example: Base URL https://routellm.abacus.ai/v1, Model ID abacusai/Smaug-Flash. The model supports 1M context. The gateway's /v1/models endpoint reports context_length: 1000000. Zoo Code still shows 128000. Editing the field does not persist. The value springs back immediately.

To Reproduce

  1. Open Settings. Select the OpenAI Compatible provider.
  2. Set Base URL to a gateway. Set Model ID to a model outside Zoo Code's catalog.
  3. Open Model Configuration. Set Context Window Size to 1000000.
  4. The field springs back to 128000.

Expected behavior
Zoo Code saves my value. Even better: it reads context_length from the provider's /v1/models endpoint. Many OpenAI-compatible gateways expose this.

Actual result
The field resets to 128000. The profile keeps 128000 too. Zoo Code condenses context far too early as a result.

What version of zoo are you running
3.99.100823

Additional context

  • macOS 27.3, Apple Silicon.
  • The bug comes from Roo Code. See archived Roo issue #4475 (RooCodeInc/Roo-Code). The unknown-model fallback hardcodes contextWindow: 128000.
  • Workaround: Quit VS Code. Edit openAiCustomModelInfo.contextWindow in the extension state (~/Library/Application Support/Code/User/globalStorage/state.vscdb, key ZooCodeOrganization.zoo-code). Restart. Then change any setting in the UI. This triggers a profile save. The value persists now. A profile switch before the save reloads 128000.
  • I run three profiles on one gateway. I must repeat this procedure for every profile and every new model I select. Fetching /v1/models would fix this whole class of gateways and custom models.
主要言語
TypeScript
スター
2k
フォーク
301
平均マージ
3日 14時間
マージ済み PR(30日)
103

環境構築

はじめの一歩

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

Zoo-Code-Org/Zoo-Code のほかの issue

Zoo-Code-Org/Zoo-Code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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