Connection
Base URL, credentials and a reachable server.
Check resets and multiple style parameters while leaving unfinished sequences and non-SGR controls untouched.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
import re
SGR = re.compile(r"\x1b\[[0-9;]*m")
def strip_semicolon_sgr(text):
if type(text) is not str:
raise ValueError("sgr.type")
return SGR.sub("", text)
# Other control sequences are deliberately left untouched.