Recommended Free Tools
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Google Antigravity SDK local-model failures usually come from choosing the wrong runtime path, pointing at the wrong file or endpoint, or asking a model to fit within insufficient memory. The first question is which route you configured: LiteRTAgentConfig for a .litertlm checkpoint, or LocalOpenAIAgentConfig for a separately managed OpenAI-compatible server such as Ollama or LM Studio. These routes are not interchangeable. The SDK manages the LiteRT loopback server itself; the external-server configuration expects another process to be running. Work through the matching checklist below before changing hardware or blaming the model.
Which local-model route did you configure?
Identify the configuration class before troubleshooting anything else. Google documents two distinct local execution routes, with different startup, addressing and failure modes.
| Route | Configuration | Who runs the server? | Model input | First checks |
|---|---|---|---|---|
| LiteRT-managed | LiteRTAgentConfig |
The SDK starts and manages its local loopback server. | A local .litertlm checkpoint, such as the documented Gemma path. |
File exists, path is expanded, and the selected backend is supported. |
| External OpenAI-compatible | LocalOpenAIAgentConfig |
You start and maintain the server separately. | A model identifier registered with Ollama, LM Studio, vLLM or another compatible server. | Server process, exact host and port, API path, and model name. |
See Google’s local-model SDK documentation and the repository’s local-model reference for the route-specific configuration details.
Important: do not point LocalOpenAIAgentConfig at litert-lm serve. A LiteRT checkpoint belongs with LiteRTAgentConfig; the external configuration is for a server exposing an OpenAI-compatible API.
Popular on Amazon
- 【90 Degree Full Function USB C Adapter】Supports the latest USB4 standard for up to 40Gbps of bandwidth, 8K video support, and up to 240W Fast charging; Support USB PD 3.1 Extended Power Range (EPR) including 140W, 180W and 240W. Your productivity is easily doubled. *Warm Tip: For the best fit, please make sure the USB-C port is fully exposed; thick or bulky cases may affect compatibility.
- 【Reliable Quality】Made from high-quality, scratch-resistant aluminum alloy, delicate metal frame. get excellent wear resistance and heat dissipation. Non-Slip Design for easier insertion and removal.
- 【Small and portable】Ultra thin size, ultra compact design, a petite physique that matches the minimalist design of your modern laptops. Coming with a slim figure that won't block the port next to the one it's plugged into.
- 【Compatibility】Widely work with most usb c, thunderbolt 4/3 devices. Compatibilit for ROG Ally, Steam Deck, Switch, MacBook Pro, Quest 3 VR headset, Surface Book 2, iPhone 18/17/16/15, Samsung Galaxy S23/S22/S21, Note 20/10, Google Pixel, ChromeBook, etc.
- 【Excellence Customer Support】If you experience any issues or cable failure, simply reach out to our dedicated customer service team. We provide a prompt response within 18 hours, providing you with the necessary technical support to resolve any concerns.
How do I fix a LiteRT model that will not connect?
For LiteRT, the most common setup errors are a missing checkpoint, an unexpanded home-directory shortcut, an unsupported backend, or attempting to manage the server yourself. Check these in order.
- Confirm that the file is a LiteRT checkpoint. The managed route expects a file ending in
.litertlm, not an arbitrary weights file or an Ollama model tag. The documented Gemma import places the checkpoint at~/.litert-lm/models/gemma4-26b/model.litertlm(Google’s local-model guide). - Pass an absolute path or expand the home directory yourself. The SDK example does not automatically expand a literal
~inmodel_path. Use Python’s path expansion before constructing the configuration:
import os
checkpoint = os.path.expanduser(
"~/.litert-lm/models/gemma4-26b/model.litertlm"
)
# Pass checkpoint as model_path to LiteRTAgentConfig
You can also use an absolute path. Before starting the agent, verify the path in the same environment that launches Python:
from pathlib import Path
path = Path(checkpoint)
if not path.is_file():
raise FileNotFoundError(f"LiteRT checkpoint not found: {path}")
This check distinguishes a path problem from a runtime problem without changing any model settings.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →- Let the SDK own the LiteRT server lifecycle. With
LiteRTAgentConfig, do not separately launchlitert-lm serveand then try to connect to it through the external-server class. Starting a second process can create a port conflict or send requests through the wrong protocol. Configure the checkpoint and allow the SDK to start its loopback service. - Check the backend selected for your machine. A checkpoint can be present and still fail during engine initialization if the requested accelerator/backend is unavailable or incompatible. Record the backend value, operating system, LiteRT-LM version and the complete initialization traceback; do not infer the cause from a generic “connection refused” message because the process may have exited before accepting requests.
- Restart after correcting the path or runtime. Stop stale Python and LiteRT processes, then launch one clean agent. This removes confusion from an old process bound to a port or holding a partially initialized model. If the clean start fails, preserve the first traceback rather than repeatedly restarting and losing the original error.
For a LiteRT failure, the useful evidence is the exact model_path, whether the file exists and its size, the backend, LiteRT-LM version, SDK version, operating system, and the first complete exception. A missing file and an out-of-memory crash can both look like “the local model did not connect” from the calling code, but they require different fixes.
Also popular on Amazon
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
How do I fix an Ollama, LM Studio or other OpenAI-compatible connection?
The external route succeeds only when a separate compatible server is running, listening on the address you configured, and exposing the model name you requested. Fix the server side before changing the agent prompt or tools.
- Start the server using its own instructions. Google’s getting-started example tells Ollama users to run
ollama serveand pull a model before starting the agent. For LM Studio, enable its local server and note the port it actually binds to. The example addresses are not universal defaults: Ollama is shown athttp://localhost:11434/v1, while an LM Studio example useshttp://localhost:1234/v1(repository getting-started guide). - Use the exact base URL, including the API path expected by the server. Copy the host and port from the server’s status output or settings. A server on port 1234 will refuse a request sent to 11434; a base URL missing the server’s
/v1path may produce a 404 instead of a connection error. Do not substitute the LiteRT server address. - Match the model identifier exactly.
LocalOpenAIAgentConfigtakes a model identifier recognized by the server. Use the name shown by Ollama or LM Studio, including any tag or quantization suffix the server requires. A reachable endpoint can still return a model-not-found error when the identifier differs by one character. - Check process and network boundaries. If Python runs inside a container, virtual machine or remote development environment,
localhostrefers to that environment, not necessarily the host where the model server runs. Use the address reachable from the Python process, and check local firewall or port-forwarding rules when the server is on another machine. - Separate authentication and protocol errors from refusal. “Connection refused” generally means no process is listening at the address; HTTP 404 points to a wrong path; a model-not-found response points to the identifier; and a timeout can indicate a server still loading the model or a resource bottleneck. Save the status code and response body rather than collapsing every error into “Antigravity cannot connect.”
A minimal configuration follows the documented shape, but keep your installed SDK’s import and agent-construction syntax:
from google.antigravity import LocalOpenAIAgentConfig
config = LocalOpenAIAgentConfig(
model="MODEL_NAME_REGISTERED_WITH_YOUR_SERVER",
base_url="http://localhost:11434/v1",
)
The important values are the server-recognized model name and the reachable OpenAI-compatible base URL. If you are using LM Studio, replace the example address with the port shown in its local-server panel.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsWhy does the local model run out of memory?
Memory is model- and workload-dependent. For the documented Gemma 4 26B A4B local workflow, Google recommends at least 24 GB of VRAM or unified memory, and the SDK documentation lists an approximately 16.8 GB checkpoint download. Google’s announcement similarly says, “We recommended a machine with >24GB VRAM or unified memory,” in a September 23, 2026 post by Sachin Kotwani and Taylor Mullen (Google Developers Blog).
Also popular on Amazon
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Those figures are guidance for that named checkpoint, not a universal minimum for every local model. A download size is not the same as total runtime consumption: the process also needs space for model execution, key/value cache, prompt tokens, tool definitions, agent instructions and the operating system. Longer conversations and tool-heavy configurations can therefore exhaust memory on a machine that appears to have enough capacity for the file itself.
| Published figure | What it applies to | How to interpret it |
|---|---|---|
| About 16.8 GB | Gemma 4 26B A4B checkpoint download | Storage/download size, not a promise of total runtime usage. |
| At least 24 GB | Google’s SDK guidance for VRAM or unified memory | A recommendation for the documented workflow, not a guarantee against OOM. |
| More than 24 GB | Google Developers Blog wording for the local workflow | Reinforces that headroom matters; it is not a failure-rate statistic. |
If your machine has less memory than Google’s recommendation, choose a smaller or more aggressively compressed model supported by your server, reduce context and tools, or move inference to hardware with more available memory. Do not buy a GPU as the first response to a wrong URL, missing checkpoint or stopped server: additional memory cannot repair a configuration error.
Can lightweight configuration prevent an out-of-memory error?
It can reduce local overhead, but the documentation does not promise that it fixes every OOM condition. LiteRT applies a lightweight preset automatically. With an external OpenAI-compatible server, the SDK examples show calling .lightweight() to trim instructions and tools for smaller local contexts (local-model reference).
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The demonstrated lightweight behavior reduces prompt overhead, keeps only essential tools, disables subagents and tunes compaction. That can lower context-related memory pressure, especially after a long conversation, but it does not shrink the model weights. If the model itself cannot fit in available VRAM or unified memory, a prompt preset alone will not solve the underlying capacity limit.
Also popular on Amazon
- Portable and powerful USB-C HUB: BENFEI USB Type-C HUB, with super-soft and knot-free silicone woven design cable, meets most mobile office needs. Compact, lightweight, stylish, and powerful portable USB C Hub equipped with 1 x HDMI port, 1 x 100W charging, and 3 x USB ports. 18-month warranty, 24-hour response, to ensure you feel at ease when using our product.
- Design centered on comfort and reliability: Thanks to BENFEI's end-to-end in-house cable production capability, in-house PCBA and assembly capability, using the industry's most advanced silicone woven design and process, 20cm cable in length, no knots, super-soft, the HUB is easy to use in all scenarios: laptop, tablet, stand etc. Super-soft, 25000+ life cycles, to meet your daily carrying and office needs.
- 100W Charging: Support up to 90W USB C pass-through charging via Type-C port to keep your laptop powered. 10W is reserved for other interface operations. No data and video function on the Type-C port.
- 4K HDMI Display: The HDMI port supports media display at resolutions up to 4K 30Hz, keeping every incredible moment detailed and ultra vivid. Please note that the C port of the Host device needs to support video output.
- Transfer Files in Seconds: Transfer files and from your laptop at speeds up to 10 Gbps with USB A 3.2 port. Extra 2 USB A 2.0 ports are perfectly for your keyboards and mouse.
Use lightweight mode as a controlled diagnostic:
- Record the model, backend and available memory during the failing run.
- Enable the supported lightweight preset for your route (automatic for LiteRT; explicit
.lightweight()for the external configuration). - Retry with a short prompt and no unnecessary tools or subagents.
- If the short run succeeds but a long session fails, reduce context growth and compaction pressure. If even startup fails, investigate model fit, backend initialization and memory availability instead.
What should I check when the error says “connection” but the real cause is runtime failure?
A client can report a connection failure because the local engine crashed, never finished initializing or closed its socket early. Treat the message as a symptom until you determine whether a server was listening and whether the model process remained alive.
- Connection refused immediately: verify the process, host and port; for LiteRT, verify that the SDK could find and initialize the checkpoint.
- 404 or model-not-found response: correct the
/v1base path or model identifier. - Timeout while loading: inspect server logs and memory pressure; the model may still be loading or swapping.
- Process exits with an allocator or backend error: treat it as a capacity or backend problem, not as a networking problem.
- Failure after a long conversation: retry lightweight mode and a shorter context to test prompt/tool overhead.
Do not assume that a repository issue about subprocess cleanup or LiteRT streaming describes your installation. The project’s issue index contains individual reports, and the changelog records continuing local-runtime fixes, including early client disconnect and local engine initialization changes (SDK changelog; issue index). These records make the installed version relevant, but they do not establish one universal bug or guarantee that upgrading alone will resolve your error.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What information is needed to diagnose an unresolved failure?
Once the route-specific checks are complete, collect a reproducible diagnostic bundle. Without it, prescribing a particular fix would be speculation.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →- Operating system and architecture.
- Installed Antigravity SDK version and LiteRT-LM version, if applicable.
- Exact model name, format and quantization; for LiteRT, the complete
model_path. - For an external server, the complete
base_url(redact credentials) and the model identifier registered there. - Selected backend or accelerator, plus available VRAM or unified/system memory at startup.
- The full traceback or HTTP error, including status code and response text.
- Whether the failure occurs at process startup, first request, tool use or after the context grows.
- Server and SDK logs from the same attempt, with timestamps.
With those facts, you can classify the failure as path/configuration, endpoint/server availability, model registration, backend compatibility or capacity. Each category has a different remedy; changing several variables at once makes the next failure harder to interpret.
Also popular on Amazon
- 【Read before You Buy】 Note: This adapter is USB 2.0 version and cannot transmit HDM, VGA, or other video signals. Nevertheless, they are fully capable of charging devices,duplicating files, and can be seamlessly integrated with USB-C earphones, wireless network adapters, and SD card adapters.
- 【Easy to Use and Safe】Thanks to modern manufacturing techniques, we've made these adapters sufficiently compact so that they can remain inserted in your device without noticeable protrusion or inconvenience. This means you don't have to constantly plug and unplug them, reducing the likelihood of wear and misalignment, and making them more convenient to carry around.
- 【Reliable Quality】Engineered for enhanced durability, durable aluminum alloy shell material,get excellent wear resistance and heat dissipation,the male USB C and female USB connectors & the male USB and female USB C connectors are designed to be plugged and unplugged up to 20000 times. Provides data transfer, device charging, memory space expansion, and additional computer peripherals.
- 【Think more for you】Do you need to connect a USB-C-enabled device to an odd device that only has USB-A ports? Then these USB-A male to USB-C female adapters are made for you.Simply insert the adapter into the USB-A port on the device, and you can instantly connect your USB-C device to the device that originally didn't have the correct connection port.
- 【Trusted xiwxi Quality and Service】As a responsible brand seller, you will receive xiwxi's 12-month Quality assurance and lifetime friendly customer service, you're not just buying a product,you're investing in peace of mind with all-round quality and exceptional customer service.
How can I prevent the same local-model failure next time?
- Document which route is in use and keep the configuration class beside the model name in your project.
- Use an expanded absolute LiteRT path rather than relying on shell-style
~expansion inside Python. - Keep external server startup separate and record its actual host, port, API path and registered model list.
- Pin or record SDK and LiteRT-LM versions so a later runtime change is visible in diagnostics.
- Check memory before loading a large checkpoint, leaving headroom for the context, tools and operating system.
- Start new debugging attempts with lightweight settings and a short prompt, then add tools or longer context one change at a time.
- Preserve the first complete error and the server log; repeated restarts without logs often erase the useful evidence.
The practical rule is simple: fix route, path or endpoint errors first; then investigate model registration and backend initialization; only after that tune memory and context. Hardware upgrades address capacity, not a mismatched configuration.
Frequently Asked Questions
Can I use a LiteRT checkpoint through an OpenAI-compatible server?
Not through the documented Antigravity configuration path. A .litertlm checkpoint should use LiteRTAgentConfig; LocalOpenAIAgentConfig expects a separately managed server that exposes an OpenAI-compatible API.
Does deleting and re-downloading the model fix every LiteRT error?
No. Re-downloading helps only when the checkpoint is missing or damaged. An unexpanded path, unsupported backend, wrong configuration class or insufficient memory will remain after a fresh download.
Why does the first request work but a later request runs out of memory?
Later requests may carry a larger conversation, more tool definitions or additional agent state than the first request. Try the supported lightweight settings and a shorter context, then compare memory use before adding tools or subagents back.
Is 24 GB of VRAM enough for every Antigravity local model?
No. Google’s 24 GB guidance is specifically associated with the documented Gemma 4 26B A4B workflow. Different model sizes, quantizations, backends and context lengths have different requirements, so treat the figure as model-specific guidance rather than a universal guarantee.

