Skip to content

Restore per-NPC LLM backend selection (regressed in SDK extraction #225) #236

Closed as not planned

Description

@larstalian

What this is

Restore per-NPC LLM backend selection, which regressed when openrange-pack-sdk was extracted (#225).

Before the extraction, cyber webapp NPC factories took a model: config key and constructed a concrete agent backend. That couldn't survive the strict pack-cannot-import-openrange boundary (it needed to build a concrete StrandsAgentBackend), so it was removed. Today every NPC in an episode shares the single RunConfig.npc_agent_backend.

Proposed shape

Mirror the entry-point pattern so pack code stays free of openrange imports:

  • Add a backend_id: config key on NPC factories (a plain string the pack can carry).
  • Add RunConfig.npc_backend_factory: Callable[[str], AgentBackend] | None that the runtime resolves at NPC start, mapping backend_id → concrete AgentBackend.
  • The pack never imports openrange; the host wires the factory.

Where

  • NPC base / AgentNPC in openrange_pack_sdk (packages/openrange-pack-sdk/src/openrange_pack_sdk/_protocols.py).
  • NPC factories in packs/cyber_webapp/cyber_webapp/npcs/.
  • RunConfig / NPC start in src/openrange/core/.

Acceptance

  • A single episode can run two NPCs on two different backends, selected by backend_id.
  • No openrange import appears in pack code.
  • Integration test exercising two distinct backends in one episode.

This is the 🚧 Core item in ROADMAP.md that had no tracking issue.

Activity

  1. added
    design-neededNeeds a design pass before code
    coreCore library / runtime / admission
    roadmapTracked on the public roadmap
    on May 29, 2026
  2. larstalian commented on Oct 12, 2026

    @larstalian
    ContributorAuthor

    No longer involved with this project, so closing my open issues. Feel free to reopen anything you still want to track.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreCore library / runtime / admissiondesign-neededNeeds a design pass before coderoadmapTracked on the public roadmap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions