Skip to content

feat: add cheapaimodel provider - #16

Open
nicho810 wants to merge 2 commits into
Jeomon:mainfrom
nicho810:feat/cheapaimodel-provider
Open

nicho810 wants to merge 2 commits into
Jeomon:mainfrom
nicho810:feat/cheapaimodel-provider

Conversation

@nicho810

@nicho810 nicho810 commented Nov 5, 2026 •

Copy link
Copy Markdown

Adds cheapaimodel as an LLM provider. Mirrors #14 (Cheaper Inference): same files, same shape.

I work on cheapaimodel. It is an OpenAI-compatible Chat Completions gateway (tool calling supported), billed per token from a prepaid USD balance.

ChatCheapAIModel extends ChatOpenAI and only sets the base URL, the API key env var and the provider name.

Changes
  • windows_use/providers/cheapaimodel/ — new ChatCheapAIModel class.
    • Base URL: https://api.cheapaimodel.ai/v1.
    • Key: CHEAPAIMODEL_API_KEY (keys start with sk-, created at https://console.cheapaimodel.ai/keys). Optional base URL override: CHEAPAIMODEL_API_BASE.
    • Default model: deepseek-v4-1-flash.
  • windows_use/providers/__init__.py — export ChatCheapAIModel.
  • windows_use/cli/registry.py — provider (right after Cheaper Inference), models, API key flag and display name.
  • windows_use/cli/setup.py — create_llm branch and env var map entry.
  • README.md — provider table row and a short usage example.
  • tests/unit/providers/test_cheapaimodel.py — client defaults and CLI registry entries.
Model notes
  • Models: deepseek-v4-1-flash, glm-5.3, glm-5.3-flash, kimi-k3, grok-4.7. Prices: https://cheapaimodel.ai/models
  • glm-5.3 is text only; the other four, including the default deepseek-v4-1-flash, accept images, so the default works with use_vision=True.
  • kimi-k3 only accepts temperature 1 or 0.6. The class keeps ChatOpenAI's default of not sending temperature, which works.
Testing
  • python3 -m py_compile on all touched Python files — pass.

  • ruff check and ruff format --check on the changed files — pass.

  • I did not run pytest: I'm on macOS and did not install the Windows-only dependencies, so the new tests have not been executed yet.

  • Live run of ChatCheapAIModel from this branch (loading windows_use.providers directly, Python 3.12, without the Windows-only packages), one call per case:

    Model Text Tool call (get_weather) Image (ImageMessage)
    deepseek-v4-1-flash ok ok ok
    glm-5.3 ok ok 400 (text only)
    glm-5.3-flash ok ok ok
    kimi-k3 ok ok ok
    grok-4.7 ok ok ok

    I didn't drive a real Windows desktop with the agent.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant