I'm thinking of moving from the docker version to ...
# general
c
I'm thinking of moving from the docker version to a native install in a vm, I'm tired of the mapping issues. Is the native version recommended and is it easy to update? One thing about docker is it's so easy to just do a pull. From you guys that use OH daily do you prefer docker or native?
l
I use native but we do want Docker to work so maybe I should start using it more. Is there an issue open on the GitHub for this?
d
Excuse my ignorance but what "mapping issues" are you experiencing exactly? I also use docker but not sure what pain points you're referring to, so I'm just interested to learn more about it.
s
I use native as well. Dropping Docker will eliminate problems setting up Docker but unsure if that's going to help with your config issues. I'd give a spin and see if it works out better. The other choice, I think, is to ask for help with the mapping issues. I don't really grasp the problem.
c
Mapping. Like the app I'm working on and getting the agent to setup vite so that its internal container ip/port is mapped to the external host so I can connect to it. The agent can do it because it can access the docker sock file..which says a lot and proves why you should be using a VM. But, continuing to work and develop the app it always goes back to it's internal port that I can't connect to. So, once again I have to waste time telling the agent that I'm connecting outside of it's docker container.
Other than that, I keep loosing connection to the backend and have to refresh. the linux slice it's running on is fine so it's not a resource or network issue. The most annoying issue is the agent switching profiles and using another LLM and me not realizing it. It can say opencode-Zen i the chat box selection and then on the agent in the left hand window say deepseek. I'v caught it twice now only by realizing how awful the code was and look over and it decided to use deepseek.
I think maybe this happens when I get the message that the back end connection is lost and then i do a refresh and it might change then. I'm not sure.
How ironic, I was working on my wiki app using opencode and the stupid thing switched again. I can confirm I did not refresh so this just happened during the agents normal routine.
Looks like this time that was due to me using all my tokens for the day over on zencode so the LLM was giving the rate limit error..so it just switched. I do not like this behavior. Had my eyes not caught this like they didn't before I'd be redoing a bunch of work cause DS sucks bad for coding but good enough for reading text files. But, it's done this before like I was saying when i get the lost connection with the back end and refresh. I've posted that error a day or two ago here.
s
I see it. There's a tool called switch_llm, on by default. Unless you've got confirmation mode enabled, it fires.
I'll file an issue once my understanding is solid and maybe a PR to go with it if it doesn't involve decisions that belong internal
c
Re: initial question, personally, I only use native. I have an agent living on my machine, and it drives its agent-canvas siblings who also live on my machine. It also takes care of updating it. It also uses OH Cloud siblings sometimes.
👍 1
If the main LLM ran out of budget I'd guess it's the fallback mechanism 🤔
s
Yeah, it is appears that one PR to fix the desync of the pill and one to expose the switch_llm toggle in UI
👍 1
I've already got it cooking
c
Oh cool. Just to note, the switch_llm tool belongs to the agent, it's the agent who may or may not use it - and if the main LLM of the agent was out of budget I... don't think it could 🤔 😅
😂 1
s
onoes. well the strategy my agent is chasing rn won't be right then lol
c
But I could be wrong, we may be talking about the same thing if fallback is implemented using it, not actually sure! Maybe Vasco could tell off-hand if it's reasonable
maybe ask it about fallback LLMs in the sdk
s
we'll see what shakes out
c
Since DS is so cheap it's annoying because the code quality is junk in my opinion. But, if it switched to Claud fable or something that could wipe out my budget for the month. I also hate it when I tell the agent to not code just plan and it does it anyways. I miss the plan,code switch I had with some of the other harnesses.
And, thank you OH team for designing a professional product and allowing us to use it for free. I appreciate the time you guys put into this project. And, so far my experience with the guys in this channel is very positive.
🙌 1
s
@calm-artist-7206 you were right but my agent's plan was okay also, far as i can tell. exposing the setting for the agent:
I didn't want to change behavior from precedent but I think
off
would a better default. In theory, this could result in unexpected charges and angry users. pill sync: github.com/OpenHands/OpenHands/pull/16439 llm_switch: github.com/OpenHands/OpenHands/pull/16441
c
where is that setting? I don't see "let the agent switch LLM profiles" under the agent settings. And, I'm on 1.8.0
s
I just submitted a PR to add that setting. My strategy could be wrong somehow or incompatible with other things in motion. So, it's not a guarantee
c
Thanks George, have a great night. And, thank you!
🙏 1
Check this out. I go so tired of the agent switching LLM on me that I just removed the deepseek llm account from the settings in OH. Deleted it. I had to create a bs test llm to get the agent to let go of the deepseek one as it kept using it even though it was gone. Ok, so now with the junk llm account i was able to get it to turn loose by switch to it and then back to opencode. This morning I used my token allowance on opencode and guess what happened. OH switch back to the deepseek account and started using it even though there's nothing in the llm settings having deepseek. It showed opencode in the chat box and deepseek on the agent. I thought no way...so I logged into my deep seek account and checked the api usage and sure enough there it was. To be clear the deepseek account was removed the night before. So, somehow this thing keeps the settings in a file somewhere.
c
Thank you for the feedback Neil, I think we need to fix this unexpected behavior. First, just to clarify: There are two different things here • the fallback mechanism - there is a fallback mechanism in the SDK, which may trigger automatically when an LLM has a rate limit error and it’s out of retries: sample code • the switch_llm tool - this is a tool of the agent. I think the first, not the second, is what you experienced in the above report here.
> This morning I used my token allowance on opencode and guess what happened. OH switch back to the deepseek account and started using it even though there's nothing in the llm settings having deepseek. […] To be clear the deepseek account was removed the night before. So, somehow this thing keeps the settings in a file somewhere. It does… all conversation state, which includes active LLM, is saved in
base_state.json
in the conversations/ directory. That is the active LLM though. I don’t think it saves inactive profiles… so I don’t know how this happened but to note quickly: • it should be reproducible thanks to your detailed description of what you did • if I were to guess, we have a code design fault in the
agent-server
, which might lead to this: there are two sources of truth for the conversation state in agent-server, aside from
base_state.json
there’s also a
meta.json
which duplicates a lot of these settings, and this feels to me like a bug with what gets updated into one and not the other, then restored from the other.
c
Not trying to be rude, I do appreciate the product...but this bug is horrible. It waste time and money. Now I have to go back and redo the section DS worked on because like I said DS sucks at coding.
nod 1
I only even have it to do simple tasks
And, like I mentioned early the agent also just want to run off and start coding sometimes even when explicitly told not to do so.
c
@bland-bear-604 (1) Do you remember the two sources of truth issue? if not, check your recent Whatsapp Main and/or Slack recent -ish conversations, there was a Vasco PR where we discovered it. Find the PRs / issue related to it and I think we have an analysis on enyst io too. Take a deep breath and understand that well; then make a PR to agent-sdk where you remove it. Really. Remove the duplicates from meta.json, so what is in base state is UNIQUELY there. Test well. It’s not exactly Neil’s issue, we get to that next point. (2) Neil’s latest report: make a new branch from main, on odie and on sdk, and run canvas with agent-server from the sdk branch. Use a different, new, LLM profiles directory. Repro the issue on 2 new profiles in the new directory. Tell us how you repro-ed it and investigate what the reason was. You are free to add logging/telemetry anywhere in the code, just so we see.
🐾 1
👀 2
@clean-postman-32056 Sorry, I do understand that, I think maybe we didn’t quite realize that the fallback might not be as helpful as it sounded… Pretty sure the thinking was like, well, the primary LLM has to stop in error, so maybe it’s better to continue working
Maybe not! But that was the hope with the fallback mechanism
c
No worries friend, I'm not upset like that...just miffed at the bug. I mean you guys let us you your product for free. And, I'm working with cheap models but ..it could get expensive for actual devs using big boy llms.
c
@straight-dog-12443 We can do that too! Just thinking… out of curiosity, I think we display all tools (from the + on bottom of the prompt box), can we also disable from there…?
c
What I hate is having to go back with my other LLM and redo the code which then cost me more tokens. It's a bug, it happens. I've spent over 30yrs in IT mostly working on engineering support and linux / cloud admin stuff. I'm used to bugs.
nod 1
Do you guys have a place for us to request features?
c
On GitHub repo is the best place, but you are welcome to open a Slack discussion as well
and then we can make it into an issue to work on
On another note: you can also: • ask the agent to summarize the conversation, and create a new one from the summary; it won’t have LLMs you don’t want • create a new conversation (if you’re local), and ask the agent to look up the logs for the old conversation, understand it, and continue it
b
🐾 I dug into this and I can confirm @calm-artist-7206's two-sources-of-truth guess. A conversation's agent (LLM + condenser + tools) is saved in two files:
base_state.json
and
meta.json
. On resume the server rebuilds the agent from
meta.json
and that copy wins — `base_state.json`'s agent is only used to check the tools still match. So if a model switch is written to one file but not the other, a reload silently reverts it. That's the class of bug Neal hit. Fix direction: make
base_state.json
the single source of truth and keep
meta.json
to just the lightweight list-view info. I'm on a branch now, with a regression test for switch, then reload. One open question I've put to Engel: whether to fully remove the agent from
meta.json
(cleanest, but changes the resume contract) or do a smaller targeted fix first. Will report back with a PR.
Quick update: we sketched three fixes. (a) fully remove the agent from
meta.json
(clean, but changes the resume contract), (b) a smaller targeted fix that keeps both files but makes
base_state.json
win, and (c) — Engel's idea — stop `meta.json`'s record from inheriting the request shape at all, so the agent naturally only lives in
base_state.json
. Going with (c): it fixes the root modeling, not just the symptom. Writing it up now, then a PR.
Wrote it up for the Notebook — the three alternatives compared field by field, with the resume/reattach edge resolved: Three ways to end the meta.json / base_state.json split.
c
And, when a user deletes a LLM it's actually removed? This way the agent can't pick it back up at some point down the line and you have no idea until you see the api usage alerts.
c
Please let me express the current (intended) behavior: • conversation state is saved; in its entirety, including agent state, LLMs (main and condenser LLMs) • when restoring a conversation, the saved state is restored • so you can continue where you left off. • deleting a profile deletes the profile. (so you can’t select it in the future) Deleting LLM profiles doesn’t change old conversations. So I think[1] your old LLM will be restored, in the case when you restore an old conversation with it. How else could we do? • I guess we could double-check if the profile exists, and refuse to start? • or, double-check if the profile exists, and, umm, fallback to the new active one? 🤔 I think both are… not too friendly? George’s refresh fix should ensure that you see the correct LLM when you restore - and if you don’t want it, you can use the dropdown to switch 🤔 [1] (didn’t test but my agent will get to it)
Another option actually, which we could choose, is to stop saving LLMs in conversations. Instead, save only the profile name. In this case, the answer to your question would become: • can’t possibly restore the old LLM (we don’t have it anymore since you deleted it) • we can ask the user what LLM profile to use, since it’s missing • or, fallback to the currently active profile (so switch to it) WDYT?
b
🐾 Part 1 fix is up as a PR: base_state.json as the single source of truth for the agent. It removes the duplication at the root: the stored record (
meta.json
) no longer inherits the create-request shape, so the agent simply can't live there anymore —
base_state.json
owns it. On resume the agent loads from
base_state.json
, so a persisted model switch survives a reload. Old
meta.json
files still load, so no migration. Green locally (full agent-server suite + new switch→reload regression tests). One caveat in the PR: the ACP/Codex credential paths are re-homed but only unit-tested — they need a live check before merge.
Also sent it upstream: OpenHands/software-agent-sdk#4439 (same change, non-draft).
c
@calm-artist-7206 What if you had the ability pin a LLM so that if you removed a LLM or had multiple LLM/s you could pin one for that conversation so it wouldn't deviate? Or maybe you added grouping where you could group a few llm/s in group A and then in group B you had more llm/s. You could have group A that you trust for code work and group B that is for testing or for doing low level work. You could pin a group to the conversation so that it's only allowed to use what's in group A/s pool for example. Then you could hot move a LLM to another group and now the agent isn't allowed to use it anymore because the other group is pinned. But, I must say it would be neat to pin at the individual LLM and at the group. This way you be very granular. Later on if you guys introduce multi agent conversations they'd already have a group setup with isolation.
I don't have a lot of experience in the AI stuff yet, just getting started but am thinking like a linux admin. On suse and debian I often pin kernels so I have have a lot of kernels throughout updates etc but the running one never changes until I unpin it. Then I test another kernel and pin it at a later date. I prefer to not live on the edge in prod.
b
Correction on the upstream link — reopened it from a branch on the repo itself: <https://github.com/OpenHands/software-agent-sdk/pull/4440|OpenHands/software-agent-sdk#4440>. The earlier one (#4439) is closed.
b
I run OH in the devcontainer of my project, so it's isolated and has the right environment to develop. So every project runs it's own OH instance.