Skip to content

Working with Claude Code and non-Anthropic models? #22

@elifarley

Description

@elifarley

I patched poe-code to allow the selection of other models, but once ~/.claude/settings.json:model was set to glm-4.6, it just hangs a bit and shows an error:

claude -p hi
API Error: 500 {"type":"error","error":{"type":"internal_server_error","message":"An internal error occurred while processing your request"}}

Howerver, claude-code was working kinda ok when using LiteLLM proxy (ANTHROPIC_BASE_URL=http://localhost:4000) pointing both Sonnet and Haiku to glm-4.6...

model_list:
  - model_name: "claude-haiku-4-5-20251001"
    litellm_params:
      model: "openai/glm-4.6"
      api_base: "https://api.poe.com/v1"
      api_key: "os.environ/POE_API_KEY"

  - model_name: "claude-sonnet-4-5-20250929"
    litellm_params:
      model: "openai/glm-4.6"
      api_base: "https://api.poe.com/v1"
      api_key: "os.environ/POE_API_KEY"

litellm_settings:
  drop_params: True
litellm --config litellm-config.yaml --port 4000

Is there a way to make it work with poe-code, so that we don't need to install LiteLLM?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions