agent-zero icon indicating copy to clipboard operation
agent-zero copied to clipboard

Bug GPT-5-nano is not working

Open daryalbaris opened this issue 3 months ago • 5 comments

daryalbaris avatar Sep 21 '25 14:09 daryalbaris

Please provide more information.

frdel avatar Sep 22 '25 07:09 frdel

I encountered this when using GPT-5-mini as chat model and GPT-5-nano as utility model I was informing agent0ai of the change and it made decission that it needs to do some testing of its tools because of this.... then it encountered following error -> then it tried to check API codes -> agent0ai asked how to proceed but got error again before I had a change to react ..and started looping error ....

Version M v0.9.5-1 25-09-03 08:55

HALTING and falsely saying everything is ok and agent0ai should not proceed on further testing (after changing the chat model AND utility model to GPT-4.1 calmed agent0ai from this loop)

A0: Responding expand_content Traceback (most recent call last): Traceback (most recent call last): File "/a0/agent.py", line 402, in monologue tools_result = await self.process_tools(agent_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/a0/agent.py", line 777, in process_tools await self.call_extensions("tool_execute_before", tool_args=tool_args or {}, tool_name=tool_name) File "/a0/agent.py", line 864, in call_extensions return await call_extensions(extension_point=extension_point, agent=self, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/a0/python/helpers/extension.py", line 39, in call_extensions await cls(agent=agent).execute(**kwargs) File "/a0/python/extensions/tool_execute_before/_10_unmask_secrets.py", line 18, in execute tool_args[k] = secrets_mgr.replace_placeholders(v) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/a0/python/helpers/secrets.py", line 261, in replace_placeholders return re.sub(self.PLACEHOLDER_PATTERN, replacer, text) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/re/init.py", line 186, in sub return _compile(pattern, flags).sub(repl, string, count) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/a0/python/helpers/secrets.py", line 259, in replacer raise RepairableException(error_msg) python.helpers.errors.RepairableException: Secret placeholder '§§secret(OPENAI_API_KEY)' not found in secrets store. Available secrets: network_intelligence A0: Virhe: salaisuuden paikkamerkkiä ei löydy — valitse korjaustapa minimize expand Thoughts Selvitin virheilmoituksen: Agent0 yritti korvata salaisuuden paikkamerkin mutta sitä ei löydy salaisuuksien varastosta. Kirjaan virheen syyn (case‑sensitiivinen avain tai puuttuva avain) ja tarjoan kolme selkeää korjausvaihtoehtoa sekä turvallisen askel‑ohjeen. Kysyn käyttäjältä miten hän haluaa edetä (lisään salaisuuden, korjaan paikkamerkit vai teen vähemmän tunkeilevan try/except‑korjauksen extensioniin). Vastauksen tulee olla yksinkertainen valinta. Headline Virhe: salaisuuden paikkamerkkiä ei löydy — valitse korjaustapa Tool Name response Text

content_copy

volume_up Yhteenveto ongelmasta

  • Virhe: Secret placeholder '§§secret(OPENAI_API_KEY)' ei löydy secrets‑storesta.
  • Todettu: saatavilla olevien salaisuuksien lista on tyhjä (error näyttää: Available secrets: ).
  • Mahdollinen syy: avaimen nimi ei ole asetettu tai kirjainkoko (case) ei täsmää.

Kolme suositeltua toimintavaihtoehtoa (valitse yksi):

A) Suositus — lisää puuttuva salaisuus palvelimen/Agent0 UI:n kautta

  • Mene Agent0:n Settings → Secrets (tai vastaava hallintapaneeli) ja lisää avain täsmälleen nimellä joka paikkamerkissä näkyy: OPENAI_API_KEY (tai vaihda haluamasi avaimen nimeksi).
  • Kun avain on lisätty, toista toiminto joka tuotti virheen.
  • Tämä on turvallisin tapa (ei tarvitse lähettää avainta chattiin).

B) Vaihda paikkamerkki olemassa olevaan aliasiin (esim. openai_api_key)

  • Jos haluat muuttaa paikkamerkin pienaakkosiin tai toiseen nimeen, minä voin skannata ja korvata paikkamerkin työnjono‑tiedostoissa.
  • Esimerkki (ajettavaksi kontissa): find /a0 -type f -exec sed -i 's/§§secret(OPENAI_API_KEY)/§§secret(openai_api_key)/g' {} ;
  • Varmista että uusi alias löytyy secrets‑storesta (tai lisää se UI:lla) ennen uudelleenkäynnistystä.

C) Pehmeä korjaus: tee extensioniin turvallinen käsittely puuttuville salaisuuksille

orig_replacer = replacer def safe_replacer(text): try: return orig_replacer(text) except RepairableException as e: logger.warning(f"Secret not found: {e}") return text # jätä paikkamerkki ennalleen

Tämä estää prosessin kaatumisen, mutta jättää paikkamerkin käsittelemättä.

  • Käytännöllinen, jos haluat jatkaa muita toimintoja ilman että puuttuva avain pysäyttää työnkulun. Pitkäaikainen ratkaisu kuitenkin A tai B.

Turvallisuus ja lupaavat toimet

  • En tee muutoksia tai käytä OpenAI‑avainta ilman nimenomaista lupaasi.
  • Jos haluat että suoritan sanity‑checkin OpenAI:llä, vastaa "A1" ja varmista, että avain on lisätty alias‑nimellä §§secret(openai_api_key) tai kerro tarkka alias, jonka haluat käyttää.
  • Jos haluat että teen korvaus/patch C‑vaihtoehdon, vastaa "C" — teen idempotenttisen koodimuutoksen ja otan varmuuskopion ennen muutosta.

Mitä haluat nyt? Vastaa yhdellä kirjaimella: A (lisää secret itse), A1 (lisään testin kun avain on lisätty), B (vaihdan paikkamerkin), tai C (asennan pehmeän try/except‑korjauksen).

jisokuor avatar Sep 23 '25 08:09 jisokuor

  1. Temperature MUST be 1.0 (no other values supported)
  2. Use max_completion_tokens instead of max_tokens

I solved with re programming but just wanted to inform you Barış Daryal PhD. Eng.

GAMA METALURJİ UYG. MAK. KİM. DAN. SAN. VE TİC. LTD. ŞTİ

Yeşilce Mah. Dağıstanlı Sokak No: 29 Kağıthane - İstanbul Tel: + 90 212 325 2864 Fax: + 90 212 325 2884

Jarkko Iso-kuortti @.***>, 23 Eyl 2025 Sal, 11:52 tarihinde şunu yazdı:

jisokuor left a comment (agent0ai/agent-zero#732) https://github.com/agent0ai/agent-zero/issues/732#issuecomment-3323008908

I encountered this when using GPT-5-mini as chat model and GPT-5-nano as utility model I was informing agent0ai of the change and it made decission that it needs to do some testing of its tools because of this.... then it encountered following error -> then it tried to check API codes -> agent0ai asked how to proceed but got error again before I had a change to react ..and started looping error ....

HALTING and falsely saying everything is ok and agent0ai should not proceed on further testing (after changing the chat model to GPT-4.1 calmed agent0ai from this loop

A0: Responding expand_content http://localhost:32769/# Traceback (most recent call last): Traceback (most recent call last): File "/a0 http://localhost:32769/#/agent.py http://localhost:32769/#", line 402, in monologue tools_result = await self.process_tools(agent_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/a0 http://localhost:32769/#/agent.py http://localhost:32769/#", line 777, in process_tools await self.call_extensions("tool_execute_before", tool_args=tool_args or {}, tool_name=tool_name) File "/a0 http://localhost:32769/#/agent.py http://localhost:32769/#", line 864, in call_extensions return await call_extensions(extension_point=extension_point, agent=self, **kwargs)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/a0 http://localhost:32769/#/python http://localhost:32769/#/ helpers http://localhost:32769/#/extension.py http://localhost:32769/#", line 39, in call_extensions await cls(agent=agent).execute(**kwargs) File "/a0 http://localhost:32769/#/python http://localhost:32769/#/ extensions http://localhost:32769/#/tool_execute_before http://localhost:32769/#/_10_unmask_secrets.py http://localhost:32769/#", line 18, in execute tool_args[k] = secrets_mgr.replace_placeholders(v) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/a0 http://localhost:32769/#/python http://localhost:32769/#/ helpers http://localhost:32769/#/secrets.py http://localhost:32769/#", line 261, in replace_placeholders return re.sub(self.PLACEHOLDER_PATTERN, replacer, text) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr http://localhost:32769/#/lib http://localhost:32769/#/ python3.12 http://localhost:32769/#/re http://localhost:32769/#/init .py http://localhost:32769/#", line 186, in sub return _compile(pattern, flags).sub(repl, string, count) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/a0 http://localhost:32769/#/python http://localhost:32769/#/ helpers http://localhost:32769/#/secrets.py http://localhost:32769/#", line 259, in replacer raise RepairableException(error_msg) python.helpers.errors.RepairableException: Secret placeholder '§§secret(OPENAI_API_KEY)' not found in secrets store. Available secrets: network_intelligence A0: Virhe: salaisuuden paikkamerkkiä ei löydy — valitse korjaustapa minimize http://localhost:32769/# expand http://localhost:32769/# Thoughts Selvitin virheilmoituksen: Agent0 yritti korvata salaisuuden paikkamerkin mutta sitä ei löydy salaisuuksien varastosta. Kirjaan virheen syyn (case‑sensitiivinen avain tai puuttuva avain) ja tarjoan kolme selkeää korjausvaihtoehtoa sekä turvallisen askel‑ohjeen. Kysyn käyttäjältä miten hän haluaa edetä (lisään salaisuuden, korjaan paikkamerkit vai teen vähemmän tunkeilevan try/except‑korjauksen extensioniin). Vastauksen tulee olla yksinkertainen valinta. Headline Virhe: salaisuuden paikkamerkkiä ei löydy — valitse korjaustapa Tool Name response Text

content_copy

volume_up Yhteenveto ongelmasta

  • Virhe: Secret placeholder '§§secret(OPENAI_API_KEY)' ei löydy secrets‑storesta.
  • Todettu: saatavilla olevien salaisuuksien lista on tyhjä (error näyttää: Available secrets: ).
  • Mahdollinen syy: avaimen nimi ei ole asetettu tai kirjainkoko (case) ei täsmää.

Kolme suositeltua toimintavaihtoehtoa (valitse yksi):

A) Suositus — lisää puuttuva salaisuus palvelimen/Agent0 UI:n kautta

  • Mene Agent0:n Settings → Secrets (tai vastaava hallintapaneeli) ja lisää avain täsmälleen nimellä joka paikkamerkissä näkyy: OPENAI_API_KEY (tai vaihda haluamasi avaimen nimeksi).
  • Kun avain on lisätty, toista toiminto joka tuotti virheen.
  • Tämä on turvallisin tapa (ei tarvitse lähettää avainta chattiin).

B) Vaihda paikkamerkki olemassa olevaan aliasiin (esim. openai_api_key)

  • Jos haluat muuttaa paikkamerkin pienaakkosiin tai toiseen nimeen, minä voin skannata ja korvata paikkamerkin työnjono‑tiedostoissa.
  • Esimerkki (ajettavaksi kontissa): find /a0 http://localhost:32769/# -type f -exec sed -i 's/§§secret(OPENAI_API_KEY)/§§secret(openai_api_key)/g' {} ;
  • Varmista että uusi alias löytyy secrets‑storesta (tai lisää se UI:lla) ennen uudelleenkäynnistystä.

C) Pehmeä korjaus: tee extensioniin turvallinen käsittely puuttuville salaisuuksille

orig_replacer = replacer def safe_replacer(text): try: return orig_replacer(text) except RepairableException as e: logger.warning(f"Secret not found: {e}") return text # jätä paikkamerkki ennalleen Tämä estää prosessin kaatumisen, mutta jättää paikkamerkin käsittelemättä.

  • Käytännöllinen, jos haluat jatkaa muita toimintoja ilman että puuttuva avain pysäyttää työnkulun. Pitkäaikainen ratkaisu kuitenkin A tai B.

Turvallisuus ja lupaavat toimet

  • En tee muutoksia tai käytä OpenAI‑avainta ilman nimenomaista lupaasi.
  • Jos haluat että suoritan sanity‑checkin OpenAI:llä, vastaa "A1" ja varmista, että avain on lisätty alias‑nimellä §§secret(openai_api_key) tai kerro tarkka alias, jonka haluat käyttää.
  • Jos haluat että teen korvaus/patch C‑vaihtoehdon, vastaa "C" — teen idempotenttisen koodimuutoksen ja otan varmuuskopion ennen muutosta.

Mitä haluat nyt? Vastaa yhdellä kirjaimella: A (lisää secret itse), A1 (lisään testin kun avain on lisätty), B (vaihdan paikkamerkin), tai C (asennan pehmeän try/except‑korjauksen).

— Reply to this email directly, view it on GitHub https://github.com/agent0ai/agent-zero/issues/732#issuecomment-3323008908, or unsubscribe https://github.com/notifications/unsubscribe-auth/BWALEAV42OJLQK3HAUBTJ4D3UEC3ZAVCNFSM6AAAAACHC6F6AGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMRTGAYDQOJQHA . You are receiving this because you authored the thread.Message ID: @.***>

daryalbaris avatar Sep 23 '25 08:09 daryalbaris

Jarkko Iso-kuortti @.***>, 23 Eyl 2025 Sal, 11:52 tarihind

I know with GPT-5 you cannot use temperature it will complain if its something else than 1

jisokuor avatar Sep 23 '25 09:09 jisokuor

btw is there a good templates for different models to use "Chat model additional parameters" ... as a valid starting point

jisokuor avatar Sep 23 '25 09:09 jisokuor