# Caddy configuration for TNT Client LLM host mode
# Proxies :8080 to Ollama at 127.0.0.1:11434 (start Ollama separately)

{
	auto_https off
	admin off
}

:8080 {
	handle /v1/* {
		reverse_proxy http://127.0.0.1:11434
	}
	handle /healthz {
		respond "OK" 200
	}
	handle / {
		respond "TNT LLM Host Running" 200
	}
	log {
		# Backticks: env expands before lex; spaces in %APPDATA% stay one token.
		output file `{$TNT_CLIENT_CADDY_LOG:caddy_llm_host.log}`
		level INFO
	}
}
