File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[project ]
22name = " a2a-acp"
3- version = " 0.2.0 "
3+ version = " 0.2.1 "
44description = " A native A2A protocol server that exposes ZedACP agents over HTTP using JSON-RPC 2.0."
55authors = [{ name = " Autonomous Developer Agent" }]
66readme = " README.md"
Original file line number Diff line number Diff line change @@ -338,9 +338,21 @@ async def initialize(self) -> dict[str, Any] | None:
338338 self ._logger .info ("Using API key authentication" , extra = {"method_id" : api_key_method_id })
339339 await self .authenticate (api_key_method_id , self ._api_key )
340340 elif api_key_method :
341- raise AgentProcessError ("Agent requires API key authentication but no API key provided" )
341+ # Try chatgpt method as fallback when no API key is provided
342+ chatgpt_method = next ((m for m in auth_methods if m .get ("id" ) == "chatgpt" ), None )
343+ if chatgpt_method :
344+ self ._logger .info ("Using ChatGPT authentication with existing auth.json" , extra = {"method_id" : "chatgpt" })
345+ await self .authenticate ("chatgpt" )
346+ else :
347+ raise AgentProcessError ("Agent requires API key authentication but no API key provided and no chatgpt method available" )
342348 else :
343- raise AgentProcessError (f"Agent requires authentication but no supported method found. Available: { [m .get ('id' ) for m in auth_methods ]} " )
349+ # No API key method available, try chatgpt method if available
350+ chatgpt_method = next ((m for m in auth_methods if m .get ("id" ) == "chatgpt" ), None )
351+ if chatgpt_method :
352+ self ._logger .info ("Using ChatGPT authentication with existing auth.json" , extra = {"method_id" : "chatgpt" })
353+ await self .authenticate ("chatgpt" )
354+ else :
355+ raise AgentProcessError (f"Agent requires authentication but no supported method found. Available: { [m .get ('id' ) for m in auth_methods ]} " )
344356 else :
345357 self ._logger .debug ("No authentication required" )
346358
You can’t perform that action at this time.
0 commit comments