| model not listed in LiteLLM Proxy | The proxy only exposes model_list aliases, or the config was not reloaded after adding the model. | Add a model_list entry with a readable model_name, set litellm_params.model to openai/z-ai/glm-5.2, then restart or reload the proxy. |
401 | NEARAI_API_KEY is missing, invalid, or not visible to the Python process or proxy container. | Export NEARAI_API_KEY in the same shell that runs Python or pass it into the proxy container. Keep api_key: os.environ/NEARAI_API_KEY in the proxy config. |
Wrong base URL includes /chat/completions | The full curl URL was pasted into api_base. | Set api_base: https://cloud-api.near.ai/v1. Use /chat/completions only in full request URLs such as curl smoke tests or requests sent to the proxy. |
| LiteLLM returns a routing or provider error | The LiteLLM upstream model value is missing the OpenAI-compatible provider prefix. | Use openai/z-ai/glm-5.2 in the SDK and in litellm_params.model. Proxy callers can use your local alias, such as nearai-glm-5.2. |