feat: replace republic with any-llm-sdk#229
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bub | 35e1c1e | Commit Preview URL Branch Preview URL |
Jun 11 2026, 06:19 PM |
fa0f9cf to
a27a537
Compare
a27a537 to
df4d489
Compare
|
for minimal changes, I removed codex oauth and login openai cmd, may need re-intro as a builtin plugin with native codex sdk and removed the api format, because we can use native any-llm-sdk..... emmmm, need more time for review |
| tool_calls = _ToolCallAccumulator() | ||
| response: ChatCompletion | None = None | ||
| async with asyncio.timeout(self.settings.model_timeout_seconds): | ||
| completion = await self._completion_response( |
There was a problem hiding this comment.
Does it support messages and responses API? If not we need a shim layer for that
There was a problem hiding this comment.
The any-llm-sdk performs some internal conversions. I’ve done a quick test of openrouter’s anthropic message API, but additional testing may be required.
| api_key = ( | ||
| self.settings.api_key.get(provider) if isinstance(self.settings.api_key, dict) else self.settings.api_key | ||
| ) | ||
| api_base = ( | ||
| self.settings.api_base.get(provider) if isinstance(self.settings.api_base, dict) else self.settings.api_base | ||
| ) | ||
| llm = AnyLLM.create( | ||
| provider_key, | ||
| api_key=api_key, | ||
| api_base=api_base, | ||
| **(self.settings.client_args or {}), | ||
| ) |
There was a problem hiding this comment.
Better add a helper function for this. Or it can be a method of AgentSettings
There was a problem hiding this comment.
My bad—I'll fix it later.
draft, need more refactor to clean code