#948·openwiki

Tsubasa provider integration and personal-chat context budget

Author: cenabCreated Sep 28, 2026Updated Sep 28, 2026

This is a Tsubasa-affiliated integration proposal. The stock createOpenWikiAgent personal-chat graph at 771138461274e89072f07eb648452008be32280c produced roughly 32,140 input tokens according to Tsubasa’s conservative request estimator before the requested output budget in a clean configuration. With a 1,024-token output cap, this exceeds a 32,768-token endpoint budget before the first answer. The request includes 14 tool definitions. An earlier isolated layout measured 31,020 input tokens; the size depends on runtime context.

Reproduction uses the existing createModel ChatOpenAI-compatible path, an isolated OPENWIKI_CONFIG_DIR, the real agent graph, a one-sentence user message, and a controlled response fixture. The fixture validates the complete serialized request before responding; no live provider or successful inference is claimed. This is an endpoint-specific estimate, not a measurement using every model tokenizer. The two public aliases, tsubasa-fast and tsubasa-pro, have 32,768-token context limits. The tested public Tsubasa /v1/models route returned HTTP 404.

Setting the existing OPENWIKI_MAX_OUTPUT_TOKENS=512 explicitly allowed a controlled first turn for both aliases: 32,140 input + 512 output = 32,652. This leaves only 116 tokens of headroom. The ordinary provider-picker flow does not set this cap, so selecting the new registry entry still fails with the default output budget. A provider-only patch is therefore not ready as an ordinary setup path.

Would a model-aware fixed-prompt/tool budget check or a smaller personal-chat tool/prompt profile be appropriate here? The needed behavior should preserve user messages and allow useful responses within the model context limit. Full workflow compatibility is not established by the bounded first turn.

A separate draft provider-only contribution reuses the current ChatOpenAI transport and adds the dedicated TSUBASA_API_KEY, provider/model picker entries, managed credentials, tests, and a changeset. It will remain blocked while ordinary setup exceeds this endpoint’s budget. Requested scope: agree on the smallest context-budget behavior and a regression test before changing the agent graph. Full repository-generation and longer-conversation qualification remain outstanding.

Tsubasa affiliation and AI disclosure: OpenAI Codex inspected source and ran the controlled serializer/agent probe. No human-only attestation is made.