Troubleshooting
What to do when a client can't reach a model you share (Share a Model).
An OpenAI SDK gets 401 through --auth
OpenAI SDKs send their own Authorization: Bearer, so through a tunnel
with --auth pass the password as a Basic header instead.
from base64 import b64encode
from openai import OpenAI
client = OpenAI(
base_url="https://qwen.<user>.<domain>/v1",
api_key="unused",
default_headers={"Authorization": "Basic " + b64encode(b"friend:secret").decode()},
)/api/... returns 404
Only /v1's inference paths are served, on purpose: call the model at
/v1/chat/completions, or another of them, such as /v1/embeddings.