#!/usr/bin/env bash # Manual curl smoke-tests for every Modal LLM endpoint. # # Each block sends one tiny chat completion ("What is the capital of France?") # and prints the HTTP status, total time, and the response body. Run them ONE AT # A TIME by copy-pasting a block, or run the whole file: `bash modal/curl_tests.sh`. # Pass a number to run just that model: `bash modal/curl_tests.sh 3`. # # Notes: # * -L is REQUIRED: a cold endpoint returns an HTTP 303 redirect at ~150s while # the GPU container boots; curl must follow it. Without -L you get a bare 303. # * --max-time 900 gives a cold start (weight download + load) room to finish. # * `model` is the SERVED id (the HF repo id), NOT the URL slug. # * Set LLM_API_KEY if the apps were deployed with auth; otherwise "EMPTY" works. set -u WS="${MODAL_WORKSPACE:-gharsallah-abderrahmen}" KEY="${LLM_API_KEY:-EMPTY}" PROMPT="What is the capital of France?" MAXTIME=900 # call