Skip to content

About

Use platform.zharf.ai models in VS Code Chat

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Zharf (ژرف) for VS Code

Use Zharf models in VS Code Chat.

The extension adds the chat models of platform.zharf.ai to the VS Code Chat model picker: GPT-5, Gemini 3, DeepSeek V4, Qwen3.5, GLM-5, Kimi K2, Grok 4, MiniMax M2 and many more. Use them to ask questions, edit code and run agent mode. Each model shows its price in ژرف per million input and output tokens.

فارسی

Requirements

  • VS Code 1.127 or newer.
  • A Zharf API key from platform.zharf.ai/keys, or the zharf CLI running zharf serve on your computer.

Get started

  1. Install Zharf (ژرف) for VS Code from the Extensions view.
  2. Open the Command Palette (Ctrl+Shift+P, or Cmd+Shift+P on macOS) and run Zharf: Sign In. Your browser opens the API key page of the platform.
  3. Create a key (it starts with zk-), copy it, and paste it into the box VS Code shows.
  4. Open Chat, open the model picker at the bottom of the chat input, and choose a model from the Zharf section.

Already have a key? Run Zharf: Set API Key instead of signing in.

Choosing models

Popular families come first: GPT-5, Gemini 3, DeepSeek V4, Qwen3.5, GLM-5, Kimi K2, Grok 4 and MiniMax M2, newest version first. All other chat models follow by name. Image, video, audio and embedding models are not listed, because Chat cannot use them.

Next to each model the picker shows its price, for example 1,267 / 7,600 ژرف per 1M: ژرف per million input tokens, then per million output tokens. Hover over a model to see its context size and whether it supports tools (needed for agent mode) and images.

To show only some models, list their IDs in the zharf.models setting. * matches anything, and the picker keeps the order you give:

{
  "zharf.models": ["gpt-5.5", "deepseek-v4-pro", "qwen3.5-*", "kimi-k2*"]
}

Every model and its ID is listed at https://platform.zharf.ai/v1/models.

Using the zharf CLI

If you run zharf serve on your computer, turn on zharf.useLocalServer. Chat requests then go to that server, at http://127.0.0.1:11434/v1 unless you change zharf.localServerUrl. No API key is needed, and the key saved in VS Code is never sent to it.

Commands

Command What it does
Zharf: Sign In Opens platform.zharf.ai/keys, then asks for the key you created.
Zharf: Set API Key Asks for a key you already have.
Zharf: Sign Out Removes the key from this computer.
Zharf: Refresh Models Reloads the model list.
Zharf: Manage All of the above in one menu; also opened from the gear in the model picker.
Zharf: Show Log Opens the Zharf output channel.

Settings

Setting Default Description
zharf.models [] Model IDs to show, in order. * is a wildcard. Empty shows every chat model.
zharf.useLocalServer false Send requests to a local zharf serve instead of platform.zharf.ai.
zharf.localServerUrl http://127.0.0.1:11434/v1 Base URL of the local server.

Proxies

The extension follows VS Code's proxy settings: http.proxy, http.noProxy, http.proxyStrictSSL and http.proxyAuthorization. Without http.proxy it uses the HTTPS_PROXY and HTTP_PROXY environment variables, and skips hosts listed in NO_PROXY. Setting http.proxySupport to off turns proxying off. Requests to a local zharf serve never go through a proxy. Your operating system's trusted certificates are accepted, so company TLS inspection works.

Your key and your data

  • The API key is kept in VS Code's secret storage, which uses your operating system's keychain. It is never written to settings.
  • The key is sent only to https://platform.zharf.ai/v1. It is not written to the log.
  • What you send in Chat goes to platform.zharf.ai, or to your local zharf serve when zharf.useLocalServer is on.

To report a security problem, see SECURITY.md.

Troubleshooting

If Zharf models do not appear:

  1. Run Zharf: Sign In (or check that zharf serve is running if you use it).
  2. Run Zharf: Refresh Models.
  3. Open Manage Models… in the model picker and make sure the Zharf models are shown.
  4. Run Zharf: Show Log and look for errors.

Errors from the platform, such as an invalid key, are shown in Chat in English and Persian. If a key stops working, create a new one and run Zharf: Sign In again.

Development

npm install
npm test                     # type-check, compile, bundle and run the unit tests
npx @vscode/vsce package     # build zharf-<version>.vsix

Press F5 in VS Code with this folder open to build the extension and start an Extension Development Host.

To release, set version in package.json, add a matching ## <version> section to CHANGELOG.md, and push a v<version> tag. The release workflow runs the tests and attaches the .vsix to a draft GitHub release. Publishing to the Marketplace is opt-in: add a Marketplace Personal Access Token for the zharfai publisher as the VSCE_PAT secret and set the repository variable PUBLISH_TO_MARKETPLACE to true. To publish by hand instead: npx @vscode/vsce publish --packagePath zharf-<version>.vsix with VSCE_PAT set.

License

MIT


راهنمای فارسی

با این افزونه، مدل‌های پلتفرم API ژرف را در Chat خود VS Code دارید. GPT-5، Gemini 3، DeepSeek V4، Qwen3.5، GLM-5، Kimi K2، Grok 4، MiniMax M2 و ده‌ها مدل دیگر در فهرست مدل‌های Chat می‌آیند. با آن‌ها می‌توانید سؤال بپرسید، کد بنویسید و ویرایش کنید، یا با حالت Agent کار کنید. کنار نام هر مدل آمده است که هر میلیون توکن ورودی و هر میلیون توکن خروجی آن چند ژرف می‌شود.

پیش‌نیازها

  • VS Code 1.127 یا جدیدتر
  • کلید API از platform.zharf.ai/keys، یا ابزار خط فرمان zharf که با zharf serve روی کامپیوترتان اجرا شده باشد

راه‌اندازی

  1. افزونه Zharf (ژرف) for VS Code را از بخش Extensions نصب کنید.
  2. Command Palette را باز کنید (در ویندوز و لینوکس Ctrl+Shift+P و در مک Cmd+Shift+P) و فرمان Zharf: Sign In را اجرا کنید. صفحه‌ای از پلتفرم که کلیدهای API را در آن می‌سازید در مرورگر باز می‌شود.
  3. یک کلید بسازید (با zk- شروع می‌شود)، آن را کپی کنید و در کادری که VS Code نشان می‌دهد بچسبانید.
  4. Chat را باز کنید و از فهرست مدل‌ها (پایین کادر پیام) یکی از مدل‌های بخش Zharf را انتخاب کنید.

اگر از قبل کلید دارید، به جای Sign In فرمان Zharf: Set API Key را اجرا کنید.

کدام مدل‌ها در فهرست می‌آیند

اول خانواده‌های پرکاربرد می‌آیند، به همان ترتیبی که بالا آمد؛ در هر خانواده تازه‌ترین نسخه اول است. بعد بقیه مدل‌های چت به ترتیب الفبا. مدل‌های تصویر، ویدئو، صدا و embedding در فهرست نیستند، چون Chat با آن‌ها کار نمی‌کند.

اگر فقط چند مدل را لازم دارید، شناسه آن‌ها را در گزینه zharf.models در تنظیمات VS Code بنویسید. با * می‌شود یک خانواده را یکجا انتخاب کرد؛ مثلاً kimi-k2* همه نسخه‌های Kimi K2 را می‌آورد. مدل‌ها به همان ترتیبی که نوشته‌اید در فهرست می‌آیند. فهرست همه مدل‌ها و شناسه‌هایشان در https://platform.zharf.ai/v1/models است.

{
  "zharf.models": ["gpt-5.5", "deepseek-v4-pro", "qwen3.5-*", "kimi-k2*"]
}

استفاده از ابزار خط فرمان zharf

اگر zharf را روی کامپیوتر خودتان با zharf serve اجرا می‌کنید، گزینه zharf.useLocalServer را در تنظیمات روشن کنید. از آن به بعد درخواست‌های Chat به همین سرور می‌رود. نشانی پیش‌فرضش http://127.0.0.1:11434/v1 است؛ اگر لازم بود، آن را در zharf.localServerUrl عوض کنید. در این حالت کلید API لازم نیست و کلیدی هم که در VS Code ذخیره کرده‌اید به این سرور فرستاده نمی‌شود.

پراکسی

افزونه از همان پراکسی‌ای استفاده می‌کند که در تنظیمات VS Code گذاشته‌اید (http.proxy و http.noProxy). اگر http.proxy خالی باشد، سراغ متغیرهای محیطی HTTPS_PROXY و NO_PROXY می‌رود. درخواست به zharf serve روی کامپیوتر خودتان هیچ‌وقت از پراکسی نمی‌گذرد.

کلید API کجا ذخیره می‌شود

کلید جایی ذخیره می‌شود که سیستم‌عامل رمزها را امن نگه می‌دارد (مثل Keychain در مک)، نه در فایل تنظیمات. افزونه آن را فقط به platform.zharf.ai می‌فرستد و در لاگ افزونه (Output › Zharf) نمی‌نویسد. فرمان Zharf: Sign Out کلید را از این کامپیوتر پاک می‌کند. برای اینکه کلید دیگر هیچ‌جا کار نکند، آن را در platform.zharf.ai/keys حذف کنید.

اگر مدل‌ها در فهرست نیستند

  1. فرمان Zharf: Sign In را اجرا کنید. اگر با zharf serve کار می‌کنید، مطمئن شوید روشن است.
  2. فرمان Zharf: Refresh Models را اجرا کنید.
  3. در فهرست مدل‌ها گزینه Manage Models… را بزنید و ببینید مدل‌های Zharf آنجا هستند یا نه.
  4. با فرمان Zharf: Show Log لاگ افزونه را باز کنید و دنبال خطا بگردید.

اگر پلتفرم خطا بدهد، مثلاً کلید معتبر نباشد، پیامش در Chat به انگلیسی و فارسی می‌آید. اگر کلیدتان دیگر کار نمی‌کند، کلید تازه‌ای بسازید و دوباره Zharf: Sign In را اجرا کنید.

مشکل‌های امنیتی را به security@zharf.ai گزارش کنید.

About

Use platform.zharf.ai models in VS Code Chat

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages