Today cli always builds DefaultTypeSafeClient.builder().apiKey(ApiKey.fromDefaultFile()) against api.typesafe.ai: no other endpoint, the key file is required, and nothing local.
Proposal
Any TypeSafe-compatible HTTP server
--endpoint <url> → Builder.endpoint(URI), e.g. a server running Open-Jev or the MLX Clef-flash server from the how-to (http://localhost:8000/v1/systemone).
- The API key becomes optional when
--endpoint is given: no ~/.typesafe.apikey means no Authorization header (the builder already supports that).
Local models (client-local)
- e.g.
--local laya <dir> / --local qwen <dir> / --local clef <dir> → LocalLayaTypeSafeClient.load(dir) etc.; the rest of the CLI (questions, --print, --verbose, --timing) is unchanged, since all of them are TypeSafeClients.
Open questions
- Jar size:
client-local brings ONNX Runtime (~56 MB, native libraries for every platform) into the all uber-jar. Options: a separate classifier (e.g. all-local), or load client-local only if it's on the classpath.
- Flag shape:
--local <engine> <dir>, or --engine laya --model-dir <dir>?
- Model id:
--model is meaningless locally (the local clients accept only jev-latest/jev-preview/their own id); reject it there, or ignore it?
Depends on the module split (#35) landing first.
🤖 Generated with Claude Code
Today
clialways buildsDefaultTypeSafeClient.builder().apiKey(ApiKey.fromDefaultFile())againstapi.typesafe.ai: no other endpoint, the key file is required, and nothing local.Proposal
Any TypeSafe-compatible HTTP server
--endpoint <url>→Builder.endpoint(URI), e.g. a server running Open-Jev or the MLX Clef-flash server from the how-to (http://localhost:8000/v1/systemone).--endpointis given: no~/.typesafe.apikeymeans noAuthorizationheader (the builder already supports that).Local models (
client-local)--local laya <dir>/--local qwen <dir>/--local clef <dir>→LocalLayaTypeSafeClient.load(dir)etc.; the rest of the CLI (questions,--print,--verbose,--timing) is unchanged, since all of them areTypeSafeClients.Open questions
client-localbrings ONNX Runtime (~56 MB, native libraries for every platform) into thealluber-jar. Options: a separate classifier (e.g.all-local), or loadclient-localonly if it's on the classpath.--local <engine> <dir>, or--engine laya --model-dir <dir>?--modelis meaningless locally (the local clients accept onlyjev-latest/jev-preview/their own id); reject it there, or ignore it?Depends on the module split (#35) landing first.
🤖 Generated with Claude Code