// Problems
AI problems & solutions
45 common AI problems and fixes – errors, how-tos and choices for individuals, developers, enterprise IT, researchers, creators and students, each linked to official docs, software and scenarios.
45 problems in 21 scenarioslatest check 2026-10-22
💸 Control AI costs and usage limits
- How-toHow much have Claude Code / Codex used and cost? Usage windows and limits on subscription tools are opaque, and API calls are scattered. Local log analysers and a unified gateway are the two main approaches.
- How-toSet budgets and rate limits for a team’s LLM usage Route every model call through one gateway, issue virtual keys per person or project, and enforce budgets, rate limits and model allow-lists there.
🛡️ Let agents run safely
- How-toStop agents from deleting files or running dangerous commands Avoiding irreversible agent mistakes takes three layers: an isolated environment, least privilege, and a checkpoint before acting.
- How-toUndo agent changes: git checkpoints, worktrees and reflog git is the most reliable undo button for agents: one branch or worktree per task, frequent commits, and reflog to recover committed states after a mistake.
- How-toKeep agents from reading .env files and committing secrets Any file an agent can read may end up in the model context, logs or even commits. Handle it on three fronts: expose less, detect early, rotate fast.
- How-toDefending agents against prompt injection from web pages and documents There is no complete fix for prompt injection today. In practice you treat external content as untrusted data and limit the damage an agent can do after reading it.
- How-toHow to check an MCP server is genuine and safe before installing An MCP server runs with your permissions: you are installing a program the model can call. Look-alike package names, malicious updates and instructions hidden in tool descriptions (tool poisoning) have all happened.
- ErrorLiteLLM 1.107.0 was compromised: am I affected, and what to do On 2026-10-21 LiteLLM’s release pipeline was compromised: all seven litellm==1.107.0 wheels on PyPI and the Docker images v1.107.0 / latest / main-latest / main-stable shipped a credential stealer and a remote-code loader. Per the official post, the PyPI package was live 11:39–13:23 UTC and the Docker images 11:46–14:20 UTC; the v1.107.0 source tag on GitHub is clean, earlier versions are safe, and the artifacts have been removed. Treat any environment that installed it unpinned or pulled those images in that window as compromised.
🔌 Connect tools to agents (MCP, CLI, auth)
- ErrorMCP server won’t connect: “Connection closed” / MCP error -32000 When a client drops an MCP server right after launching it, the launch command usually failed or the server printed logs to stdout.
- How-toToo many MCP tools filling the context window Every connected MCP server puts the name, description and parameter schema of all its tools into the context. The more servers you connect, the less room is left for the task and the more often the model picks the wrong tool.
- ErrorRemote MCP server OAuth fails Remote (HTTP) MCP servers usually use OAuth. Failures mostly come from a client that does not support the flow, a redirect URI mismatch, or an expired token that was not refreshed.
📐 Share rules and skills across agents
- How-toHow to write AGENTS.md AGENTS.md is a file in your repository written for coding agents, like a README for a new colleague: how to build, how to test, code style and commit rules.
- How-toShare one set of rules across Claude Code, Codex, Cursor and Gemini CLI Each agent reads a different rules file. Keep one main file (AGENTS.md is the usual choice) and point the other tools at it by reference, symlink or configuration.
- How-toWhat Agent Skills (SKILL.md) are and how to reuse them A skill is a folder whose core is a SKILL.md with YAML front matter (name, description), optionally with scripts and references. The agent loads it when the description matches the task, which saves context compared with stuffing everything into a rules file.
🔁 Switch models: your own key, Chinese or local models
- How-toUse Claude Code with other models (Chinese models, your own gateway) Claude Code can send requests to any Anthropic-compatible endpoint set via environment variables. Many model vendors offer Anthropic-compatible APIs, and gateways such as LiteLLM or claude-code-router can translate formats.
- How-toUse Codex CLI with local or custom model providers Codex CLI’s config file supports custom model providers that point at any OpenAI-compatible endpoint, including a local Ollama.
🖥️ Run models on your own machine
- ChoiceWhat model size can my VRAM / RAM run? Rule of thumb: weight memory ≈ parameters × bits per parameter ÷ 8, plus context (KV cache) and runtime overhead. At 4-bit quantisation that is roughly 0.5–0.7 GB per billion parameters.
- ErrorOllama truncates long documents and the model “forgets” earlier text Ollama’s default context length is much smaller than many models support (the default changes between versions). When input exceeds it, earlier content is dropped.
- Errorllama.cpp prints garbage, mixes up roles or never calls tools The chat template turns messages into the format the model was trained on. With the wrong template the model emits odd tokens, talks to itself or fails to call tools properly.
- ErrorvLLM fails at start-up with CUDA out of memory At start-up vLLM pre-allocates a share of GPU memory and reserves KV cache for the maximum context length. If the model plus context does not fit, it fails immediately.
- How-toBuild a private ChatGPT on your own computer (Ollama + Open WebUI) Run open-weight models locally with Ollama and get a ChatGPT-like web interface with Open WebUI; chats and files never leave your machine.
🧭 Use AI compliantly in mainland China
📄 Build RAG and process documents
- ChoiceWhich PDF/document parser to use for RAG RAG quality depends heavily on parsing. Popular open-source parsers have different strengths; compare them on a sample of your own documents. We have not run a unified test yet.
- How-toRAG retrieves the wrong passages: how to debug First find which stage fails: parsing, chunking, retrieval or generation. Measure with a fixed question set, then improve one stage at a time.
- ChoiceGiving agents memory across sessions: memory layer or rules file? For coding agents a project rules file is often enough; apps for end users that need long-term memory may need a dedicated memory layer.
📈 Evaluate and monitor AI quality
- How-toCatch silent quality drops after model or prompt changes Build a fixed regression suite for prompts and agents and run it before and after every change or model switch, like unit tests.
- How-toSelf-hosted LLM observability: trace every call and agent step Recording every model and tool call’s input, output, latency and tokens as traces is what lets you debug. Open-source options can be self-hosted so data stays on your network.
🎁 Find free AI resources and credits
🧪 Choose tools and avoid pitfalls
- How-toIs this open-source AI project still maintained? How to tell AI open-source projects turn over fast: stalls, archives, renames and moves to closed source are common. A few minutes checking some signals before you choose can save you from building on a dead project.
- How-toCan I use this open-source AI tool commercially? Reading licences “Source available” is not the same as “open-source licence”. Many popular AI tools use licences with extra conditions, such as restricting hosted SaaS use or requiring branding to stay.
- ChoiceChoosing an agent framework: LangGraph, OpenAI Agents SDK, Pydantic AI, CrewAI, Mastra No framework is best in general; it depends on language, how much flow control you need, which models you use and how you deploy. We have not run a unified test; these are the questions to ask.
- ChoiceAre API relays / OpenRouter safe? Any third party that forwards your request to an upstream provider can see plaintext prompts and completions unless true end-to-end encryption exists (mainstream model APIs do not). OpenRouter is a well-documented aggregator: by default it does not keep prompts/responses long-term and offers Zero Data Retention (ZDR) routing. Opaque cheap relays often risk model substitution, inflated usage, exit scams, and silent logging. Safety depends on data sensitivity, verification, and how you pay and isolate keys—not on marketing claims.
🎓 Learn AI (roadmaps, tutorials)
✍️ Everyday work: writing, translation and slides
👩💻 Code with AI: choose tools, keep quality
🧱 Build apps and sites without coding
🧠 Personal knowledge base: AI that answers from my files
🏢 Private LLMs and knowledge bases for the enterprise
- How-toSelf-host Dify on company servers (Docker Compose) Dify can be deployed on your own servers with Docker Compose and connected to private models or cloud APIs to build knowledge-base Q&A and internal AI apps.
- How-toEmployees paste company data into AI: what to do Blanket bans rarely work; people switch to personal accounts. It works better to provide an approved route (enterprise plan or private deployment) plus data classification and auditing.
🗓️ Meeting notes and team workflow automation
🔬 Research: find, read and review literature
- How-toHow to disclose AI use in a paper Major journals and ICMJE agree: AI cannot be an author; describe how AI assisted writing or analysis when you submit; authors are responsible for everything. Exact placement and wording follow the target journal’s policy.
- ErrorAI-generated references that don’t exist LLMs can produce perfectly formatted references that do not exist, or mix real authors and journals with wrong titles. Verify every AI-provided citation.
🎬 Creators: AI images and video
- How-toGenerate images locally with ComfyUI ComfyUI is a node-based local image generator: unlimited, reproducible and batch-friendly. Beginners can start with simpler Fooocus or InvokeAI.
- How-toLabelling AI-generated images and video on Chinese platforms China’s Measures for Labelling AI-Generated Synthetic Content took effect on 1 September 2025: users who publish AI-generated content must declare it and use the platform’s labelling tools, and must not remove or alter labels.
📚 Students: study with AI (the right way)
No problem matches. Try another word or browse the scenarios. Scenarios →
Compiled from official documentation and public discussions (check date on each page); not reproduced in our own environment. Follow the official docs if they differ. /api/v1/problems.json