GigaChat as a standalone pi-coding-agent extension package.
- native
gigachatprovider registration forpi - built-in
GigaChat-2(Lite),GigaChat-2-Pro, andGigaChat-2-Max /login gigachatonboarding with stored credential refresh- robust streaming for tool-heavy sessions without the SDK
client.stream(...)parser path - source in
src/and published build artifacts indist/
pi install npm:@gigachain/pi-gigachatTry it without installing:
pi -e npm:@gigachain/pi-gigachatOr load the local checkout directly after building once:
npm install
pi -e /absolute/path/to/pi-gigachatAfter loading the package, select a GigaChat model with /model or start by logging in:
/login gigachat
The onboarding flow asks for:
- account type:
personalorbusiness - auth mode:
basicortoken - scope, with sensible defaults
- base URL, with the standard production URL as the default
Because the current public pi OAuth prompt API only supports text prompts, the onboarding uses text input with defaults instead of picker widgets.
After installing and authenticating:
pi -p --provider gigachat --model GigaChat-2-Pro "Say hello in one short sentence."For a tool-use smoke test:
pi -p --provider gigachat --model GigaChat-2-Pro "Read package.json and reply with only the package name."Recommended:
export GIGACHAT_CREDENTIALS=...
export GIGACHAT_SCOPE=GIGACHAT_API_PERSAlso supported:
export GIGACHAT_ACCESS_TOKEN=...Or:
export GIGACHAT_USER=...
export GIGACHAT_PASSWORD=...Optional:
export GIGACHAT_BASE_URL=https://gigachat.devices.sberbank.ru/api/v1gigachat/GigaChat-2gigachat/GigaChat-2-Progigachat/GigaChat-2-Max
Current metadata is aligned with the public GigaChat model docs as of March 23, 2026:
GigaChat-2is shown asGigaChat 2 LiteGigaChat-2-ProandGigaChat-2-Maxare marked as text-and-image capable inpi- public per-million-token pricing is reflected in the extension metadata
pi model metadata only supports text and image input flags today, so GigaChat audio-input support is not represented separately even though the upstream Pro and Max models support it.
- Uses the official
gigachatSDK for auth and request configuration. - Uses a custom SSE parser instead of the SDK's built-in
client.stream(...)path, because tool-call responses can arrive split across transport chunks and break the SDK parser. - Supports refreshable stored credentials for both basic and token-credentials login modes.
Before the first publish:
- Create the GitHub repo at
github.com/ai-forever/pi-gigachator update the repository URLs inpackage.json. - Run
npm install. - Run
npm run check. - Confirm
npm publish --dry-run. - Publish with
npm publish --access public.
npm install
npm run build
npm run check