HttpNetworkSettings

org.llm4s.http.HttpNetworkSettings
See theHttpNetworkSettings companion object
@Stable
final case class HttpNetworkSettings

How llm4s's HTTP clients reach the network: an optional HttpProxy and the HttpTls material, read once from the llm4s.http block (Llm4sConfig.httpNetwork()) and honoured by every provider client - the JDK client in core, the openai-java and anthropic-java SDKs and the AWS SDK.

A named provider section can override it for one route with its own http block (llm4s.providers.<name>.http), whose keys take precedence over llm4s.http one by one.

HttpNetworkSettings.default - no proxy, no extra TLS material - leaves every client as it was before the setting existed: the JDK client keeps the JVM's default proxy selector.

Build one with HttpNetworkSettings.apply or HttpNetworkSettings.default and the with* setters; the constructor is private, so a new field never breaks a caller.

Value parameters

proxy

the proxy to route through, or None for a direct connection

tls

the extra trust and client-certificate material

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def isDefault: Boolean

true when there is no proxy and no TLS material: every client keeps its own defaults.

true when there is no proxy and no TLS material: every client keeps its own defaults.

Attributes

def proxyFor(host: String): Option[HttpProxy]

The proxy to use for a request to host, or None when there is none or host bypasses it.

The proxy to use for a request to host, or None when there is none or host bypasses it.

Attributes

def withProxy(proxy: Option[HttpProxy]): HttpNetworkSettings

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product