Skip to content
pi-c Artifact [ec4f4a5af2]
Login

Artifact [ec4f4a5af2]

Artifact ec4f4a5af2cd6cf626456ad6165004cfeecea82c2ff515f85156cf3b36370497:

Ticket change [ec4f4a5af2] - New ticket [b9e0c49eba] Remote: providers whose key is only in the terminal's environment are missing from the phone. by dmestas on 2026-11-28 00:29:03.
D 2026-11-28T00:29:03.100
J comment Reported\sfrom\sreal\suse:\sfrom\sthe\sphone,\sthe\sowner\scannot\schoose\sOpenRouter\sor\sany\sprovider\sbut\sOpenAI.\n\nCause:\sthe\slaunch\sagent\sruns\s`pic\sremote\s--login`\swith\slaunchd's\sbare\senvironment\s(HOME,\sPATH,\sSHELL,\sUSER,\sTMPDIR,\sSSH_AUTH_SOCK\sand\snothing\selse;\s`~/Library/LaunchAgents/app.zeitforge.pic.remote.plist`\ssets\sno\sEnvironmentVariables).\sThe\sowner's\sOPENROUTER_API_KEY\sand\sANTHROPIC_API_KEY\scome\sfrom\sDoppler\sthrough\s`~/.zshenv`,\sso\sthe\sterminal\shas\sthem\s(`pic\sauth\sstatus`\sshows\s`openrouter\senv*`,\s`anthropic\senv*`)\sand\sthe\sdaemon\sdoes\snot.\sIts\sget_available_models\sand\sget_credentials\slist\sonly\sproviders\swith\sa\sstored\skey,\swhich\shere\sis\sthe\sOpenAI\ssign-in.\n\nReproduce\son\sa\sdisposable\shome,\swith\sno\slive\sservice:\n1.\s`HOME=$H\spic\sauth\slogin\sopenai\s--api-key`\swith\sany\sfake\skey.\n2.\sStart\s`env\s-i\sHOME=$H\sPATH=$PATH\sPIC_MODEL_CATALOG=offline\spic\sremote`,\sthe\senvironment\slaunchd\sgives,\sand\spair\sa\sphone\s(the\spic-relay\spage\son\sa\slocal\s`wrangler\sdev`).\n3.\sThe\sphone's\smodel\ssheet\slists\sopenai\sonly;\sthe\sKeys\ssheet\slists\sopenai\sonly.\n4.\s`env\s-i\sHOME=$H\sPATH=$PATH\sPIC_MODEL_CATALOG=offline\sOPENROUTER_API_KEY=fake\spic\sauth\sstatus`\slists\sopenrouter\senv*.\sThe\ssame\spic\ssees\sit\sfrom\sa\sshell\sand\snot\sfrom\sthe\sdaemon.\n\nObserved:\sthe\sphone\soffers\sonly\sproviders\swith\sa\sstored\skey,\sand\snothing\ssays\swhy.\nExpected:\swhat\sthe\sterminal\soffers,\sor\sat\sleast\sa\splain\sreason\sfor\seach\sprovider\sthe\sdaemon\scannot\sreach.\n\nCode\spath:\sremote.c,\s`pic\sremote\sinstall`\s(line\s~9852)\swrites\sthe\sagent\srunning\s`pic\sremote\s--login`\s(line\s~9936).\sCredential\sresolution\sreads\s`getenv(key_env)`\sin\sthe\sdaemon's\sown\senvironment,\swhich\snever\sheld\sthe\slogin\sshell's\svariables.\n\nFix\sshape\s(pic's\scall):\sat\s`pic\sremote\sinstall`,\sand\sin\s`pic\sremote\sstatus`,\sname\seach\sprovider\swhose\skey\sthe\sterminal\shas\sonly\sin\sits\senvironment,\sand\soffer\sto\sstore\sit\s(`pic\sauth\slogin\sPROVIDER\s--api-key`\sfrom\sthe\svariable).\sget_credentials\scould\salso\slist\ssuch\sa\sprovider\swith\sstate\s"missing\sin\spic\sremote:\sset\sin\sthe\sterminal's\senvironment\sonly",\sso\sthe\sphone's\sKeys\ssheet\ssays\swhy.\sSourcing\sthe\slogin\sshell\sin\sthe\sdaemon\swould\srun\sthe\suser's\sdotfiles\s(Doppler\shere)\sat\severy\sstart,\sso\sI\swould\snot\srecommend\sit.\n\nWorkaround\sfor\sthe\sowner\suntil\sthen:\s`pic\sauth\slogin\sopenrouter\s--api-key`\s(and\santhropic),\sthen\srestart\spic\sremote.
J foundin 2f9e8c02576f
J severity Important
J status Open
J title Remote:\sproviders\swhose\skey\sis\sonly\sin\sthe\sterminal's\senvironment\sare\smissing\sfrom\sthe\sphone
J type Code_Defect
K b9e0c49eba9e000b5caa270e36bf9a4bbd83ee14
U dmestas
Z 068e55c74c5283f8ecd47585b79e1e96