Model Inference Precision: BF16 vs FP8 – VRAM, Speed, Quality, and Selection

BF16 and FP8 differ mainly in bits per number; FP8 halves memory for weights and KV cache and boosts throughput on native FP8 GPUs, while BF16 is more stable for code, math, and alignment.

What to Do When LLM API Output Is Truncated: Check finish_reason First, Then Fix by Cause

Truncated LLM API output—half-finished sentences, unclosed JSON, interrupted streams—usually has only four causes: hitting the token limit, reasoning models consuming output budget with chain-of-thought, tasks exceeding the model's single-call max output, and client or proxy timeouts.

What Code to Change When Switching LLM APIs: Three Must-Change Configs and Four Compatibility Checks

When staying on the OpenAI-compatible protocol, switching models usually requires changing only base_url, api_key, and model—but if your code uses length parameters, sampling parameters, streaming usage, tool calling, or structured outputs, verify each against the target model.

How to Change Custom base_url in LangChain: Python, JS, Environment Variable Priority, and 404 Troubleshooting

Clear up where to put base_url when connecting LangChain to OpenAI-compatible endpoints: Python's ChatOpenAI, OpenAIEmbeddings, init_chat_model, and JS/TS configuration.baseURL; also covers priority of three config sources, why /v1 path errors, why streaming token stats become empty, and why third-party-specific fields aren't read.

How to Add an OpenAI-Compatible Channel in One API: Proxy URL, Key, Model Name, and Test Error Troubleshooting

Add a third-party or self-hosted OpenAI-compatible channel in One API: select "OpenAI" as channel type, fill in the compatible endpoint as proxy, enter the upstream key, and manually add the exact upstream model names. Verify with the "Test" button. The article explains each form field in order and covers troubleshooting for 404, 401, and Connection refused, plus when to enable model mapping.