Skip to content

Is My Dependence on Frontier Labs Replaceable?

Replacing my dependence on frontier labs was easier than I expected, with more control over my data and little change to how I work.

As I lean on LLMs more and more, and build products and services on top of them, I’ve become increasingly concerned about what might happen if the frontier labs became unavailable or prohibitively expensive. I wanted to know whether I could keep working the way I do without them.

So as I set myself up as an independent, I decided to try replacing that dependence, while also getting more comfortable about where my data goes.

This is where I landed.

I ended up replacing Claude Code and Anthropic models with the open-source harness pi.dev and Chinese open-weight models, hosted by Nebius. I set up the open-source LibreChat on my own server for everyday chat.

Here’s how I got there, with practical setup details at the end.

TL;DR: I was surprised at how easy it was to change out pretty much every part of the stack with open-source software and open-weight models, with very little impact on my workflow.

A note on trust. Do I trust inference providers more than frontier labs with my data? Do I trust Chinese-developed models? Neither is a blanket yes. I think about incentives: a model developer will likely highly desire my conversations to improve its models. They may also shape their answers around a particular worldview.

Choosing who runs a model separately from who created it lets me make two distinct decisions: whose model suits the task, and whose handling of my data I’m comfortable with. It doesn’t remove the need to consider model bias or check a provider’s retention policies.

Running Chinese-developed weights elsewhere doesn’t send my conversations to their creator, but any learned biases still reside in them. I’d be more concerned about those when researching the history of the Far East, for example, than when building a website or managing my accounts.

In short, I try to be aware of when the motivations of a provider may conflict with the task in hand.

The coding assistant

I moved from Claude Code to Pi, a small, extensible coding assistant, where you select and create your own extensions and compose them until you have the functionality you need. I added the capabilities (or rather, you ask Pi to extend itself) until it felt familiar, initially keeping Claude as the model so I could change one thing at a time.

Then I connected Pi to Nebius Token Factory, a European-based provider that runs models on its own infrastructure and charges for using them. The larger open-weight models I wanted weren’t a practical fit for my laptop, but I didn’t need to run them myself. I just wanted to choose the organisation handling my requests separately from the organisation that created the model.

For my development work, Kimi K3 has handled the majority of jobs comfortably, with Kimi 2.7 Code useful for simpler tasks. I’ve also had good results with DeepSeek, though I haven’t systematically compared them. I still review the code and check that the actions the agent takes make sense, but I’ve been able to spend several weeks developing without needing a frontier lab, at a similar level of cost.

Everyday chat

I was still reaching for Gemini for everyday questions out of habit, but reading Google’s data use and retention policies made me uncomfortable enough to want the same freedom of choice for chat.

An app that accepts your own provider credentials would have been the simpler route. But I used it as an excuse to learn more about my home lab and installed LibreChat, an open-source chat interface, on a mini PC at home. It can connect to multiple model and inference providers, so I have it connected to Nebius (and Claude for occasional Claude use via API), while saving my conversation history privately at home.

On my phone it gives me the nice app-like experience I wanted, and I can create separate accounts for other family members. Being hosted at home, it only works on the home network, so I use a VPN to reach it when I’m away. The history is backed up in encrypted form to S3 so it doesn’t depend on that one machine surviving.

The requests still go to the inference providers, including the conversation context needed to answer them, so I’m relying on their handling of those requests. But I can easily change who I buy inference from without changing any of my interfaces or asking the same provider to remain the custodian of my conversations.

LibreChat is awesome

I highly recommend giving LibreChat a try; it’s very feature-rich and has a great user experience. For example, you can connect MCP servers and build custom agents behind the scenes, without needing to set up each client app. Once I had the basics working, I built a Home agent with access to the home repo, where I keep household records, and connected Home Assistant, which manages devices around the house.

I gave it instructions aimed at non-technical users. The same chat interface can now look things up in our records and use the home controls I’ve connected. LibreChat lets me share that assistant with family members, without asking them to understand the files or connect MCP servers, etc. Information it retrieves still becomes part of a request to the inference provider, which makes the earlier choice about data handling quite practical.

Conclusion

I’ve ended up with a setup I understand better, feel more comfortable using, and can change piece by piece. That feels like a useful position to be in as my reliance on these tools grows.

How I set it up

For anyone wanting to build something similar, these are the pieces of my setup. The configuration excerpt comes from my running installation; the linked documentation covers the installation details.

Pi and Nebius

Pi is written in TypeScript and supports extensions; I added subagents and web search to get the development experience I wanted. The community Token Factory extension handles the Nebius connection:

pi install npm:tokenfactory-pi

I signed up for a Nebius Token Factory account (ensuring “zero data retention” was on in my account), created an API key and exported it as NEBIUS_API_KEY via my ~/.zshrc shell configuration. After restarting the shell, the extension fetches the current model catalogue at startup and registers the tool-capable text models, which you select with /model in Pi. It downloads the catalogue, not the models themselves.

LibreChat and storage

LibreChat runs as a Docker container. Mine runs on a single-node K3s Kubernetes cluster on the mini PC, because I already had that cluster up and running. The core chat services are LibreChat, MongoDB for accounts and conversations, and Meilisearch for searching the history. Being a standard container setup, you can host it in many other ways, including cloud VMs.

Nebius is an OpenAI-compatible custom endpoint. This is its entry from my librechat.yaml, under endpoints.custom:

- name: Nebius
  baseURL: https://api.tokenfactory.nebius.com/v1
  apiKey: ${NEBIUS_API_KEY}
  models:
    fetch: true
    default: ["moonshotai/Kimi-K3"]
  titleConvo: true

The key comes from the container’s environment, supplied through a Kubernetes Secret. fetch: true retrieves available models; the default is a fallback list, not the whole catalogue.

I use HTTPS with a Let’s Encrypt certificate on my own domain, with WireGuard for access from outside the home network. On the phone, Safari’s Add to Home Screen provides the app-like interface.

A nightly job dumps MongoDB and uses restic to encrypt the dump and back it up to S3. That covers accounts, conversations and the agent definitions created in LibreChat. The Meilisearch index can be rebuilt from MongoDB, so I don’t back it up separately.

Connecting the Home agent

LibreChat’s custom agents can use MCP servers, which expose tools and data to the model. My Home agent combines a filesystem server for the home repo with Home Assistant’s MCP server and instructions.

Here’s the prompt I gave the agent:

You are a household assistant. You help with two kinds of things: questions about household admin, and checking or controlling things in the house right now.

Questions about anything in our household — family, money, property, energy and utilities, contracts and insurance claims, suppliers, appliances and tools, past decisions etc: your knowledge base is a set of documents available through your file tools, rooted at /repo/current — always look there rather than guessing. When a question needs it, read /repo/current/INDEX.md first: it lists every topic and which document covers it. Follow the links there to the documents you need before answering. If the documents don't say, say you don't know.

What's happening in the house right now, and controlling things (lights, music and speakers, plugs, timers etc): use your Home Assistant tools. Check the live state before answering or acting — never guess whether something is on, off or playing. Use the room and device names people use day to day. When you've done something, say plainly what changed ("The kitchen lights are off"). If a request is ambiguous ("turn off the lights" — which room?), ask once. Before anything that affects the whole house at once, check that's what they meant. If something can't be controlled from here, say so simply rather than trying something else.

Some questions need both — "is the dishwasher running, and how do I descale it?" — so check the live state and the documents.

Answer in plain, friendly language for non-technical readers. Never mention files, paths, folders, git, repositories, tools, entity names or Home Assistant itself.

I turned the temperature down to 0.3 on the model parameters, to bias it towards facts rather than creativity.

A separate git-sync process refreshes a local copy of the repo every five minutes. The filesystem server gets a read-only mount, so the agent can look things up but can’t edit the records. That restriction is enforced by the filesystem, rather than an instruction asking the model to behave.

In this deployment the filesystem server runs alongside LibreChat and connects over local SSE. Home Assistant connects separately over HTTP. The agent’s instructions and tool selection bring them together, and LibreChat’s sharing controls let me choose who can use it.