crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

[FEATURE] Document Tsubasa through the native custom OpenAI route

Open cenab opened this issue 2 months ago • 4 comments

Feature Area

Documentation

Is your feature request related to a an existing bug? Please link it here.

NA. Current LLM already supports this route through custom_openai=True.

Describe the solution you'd like

Approve a concise provider example in the existing LLM documentation, using LLM(model="tsubasa-fast", custom_openai=True, base_url="https://api.tsubasa.sh/v1", api_key=os.environ["TSUBASA_API_KEY"], max_tokens=4096). tsubasa-pro is the other public alias. No new provider class or LiteLLM dependency is needed.

Before an invited PR, validate native OpenAICompletion serialization with both aliases and the actual request schema/context budget, then run the relevant CrewAI tests and documentation/translation checks. This source-based proposal does not claim that a CrewAI agent task has already passed.

Describe alternatives you've considered

The existing generic configuration can remain a provider-owned recipe. A compiled native wrapper would duplicate the already-supported custom OpenAI path and is not requested.

Additional context

The tested public Tsubasa /v1/models route returned HTTP 404. Live inference and agent tool behavior are unqualified. Both aliases have a 32,768-token context window. This is the issue-first step required by contribution policy.

Tsubasa-affiliated proposal.

Willingness to Contribute

I could provide more detailed specifications.

cenab avatar Sep 28 '26 01:09 cenab

HI @cenab I would like to work on this issue can you provide more detailed specifications

AlphaRex-pixel avatar Sep 28 '26 05:09 AlphaRex-pixel

The proposed scope is a short example in the existing LLM documentation under docs/edge/en, using the native custom OpenAI route:

import os
from crewai import LLM

llm = LLM(
    model="tsubasa-fast",
    custom_openai=True,
    base_url="https://api.tsubasa.sh/v1",
    api_key=os.environ["TSUBASA_API_KEY"],
    max_tokens=4096,
)

Use tsubasa-pro for the other public alias. The dedicated key must be explicit; the example should fail locally when it is missing. Both aliases have a 32,768-token combined context window, so the example reserves 4,096 output tokens and keeps the complete prompt/history within the remaining space.

The useful validation is native OpenAICompletion request serialization and response decoding for both aliases, JSON/SSE where supported, and authentication-error propagation against a controlled local endpoint. A bounded no-tools task would add useful evidence. Record the actual system prompt and serialized request budget; configuration acceptance alone does not prove an agent task fits.

No new provider class, model capability claim, or LiteLLM dependency is needed. Keep live inference/tool qualification separate: the latest /v1/models check returned HTTP404. We are checking the native route and preparing an external recipe that can supply a concrete reference.

Maintainer confirmation is still pending. Please follow the repository’s issue-link, documentation and translation requirements when proposing a contribution.

cenab avatar Sep 28 '26 06:09 cenab

@cenab I would like to contribute. Can you please assign it to me?

AlphaRex-pixel avatar Sep 28 '26 08:09 AlphaRex-pixel

Thanks for offering to contribute. I am the issue author, not a CrewAI maintainer, so I cannot assign it or approve the contribution on their behalf. The documentation-only scope and test expectations in my earlier comment still apply, subject to maintainer confirmation and the repository's AI-disclosure requirements.

One correction to the earlier status: an October 17 check of Tsubasa's public /v1/models now returns HTTP 200 with both aliases. This does not establish CrewAI agent/tool qualification; that remains separate from the proposed example.

Tsubasa-affiliated follow-up.

cenab avatar Oct 17 '26 07:10 cenab