docs+test: custom providers in README and AGENTS.md, provider-only startup PTY test
Also records the codex catalog at eight models and the 0.159.0 User-Agent.
This commit is contained in:
1 parent
ae40ba8da2
commit
c4ef8a3779
3 files changed
+98
-6
No files matched your search
@@ -127,3 +127,38 @@ async fn custom_anthropic_provider_uses_messages_and_x_api_key() {
|
||||
}
|
||||
harness.quit().expect("clean quit");
|
||||
}
|
||||
|
||||
/// A saved provider is a complete login: with no house key and no session, the
|
||||
/// pager starts authenticated and the turn reaches the provider.
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
#[ignore]
|
||||
async fn custom_provider_alone_authenticates_at_startup() {
|
||||
let content = ContentController::start_with_models(vec![MockModel::new("custom-m1")])
|
||||
.await
|
||||
.expect("start content");
|
||||
declare_provider(&content, "openai");
|
||||
content.set_response(format!(
|
||||
"{MOCK_RESPONSE_SENTINEL} from the custom provider."
|
||||
));
|
||||
let env: Vec<(String, String)> = content
|
||||
.env_for_pager()
|
||||
.into_iter()
|
||||
.filter(|(name, _)| name != "KIGI_API_KEY")
|
||||
.collect();
|
||||
let env_refs: Vec<(&str, &str)> = env.iter().map(|(k, v)| (k.as_str(), v.as_str())).collect();
|
||||
let binary = pager_binary().expect("resolve pager binary");
|
||||
let mut harness =
|
||||
PtyHarness::new_in_dir(&binary, DEFAULT_ROWS, DEFAULT_COLS, &[], &env_refs, None)
|
||||
.expect("spawn pager without a house key");
|
||||
|
||||
harness
|
||||
.wait_for_text(WELCOME_SCREEN_SENTINEL, WELCOME_TIMEOUT)
|
||||
.expect("welcome text");
|
||||
harness
|
||||
.inject_keys(format!("{PROMPT}\r").as_bytes())
|
||||
.expect("submit prompt");
|
||||
harness
|
||||
.wait_for_text(MOCK_RESPONSE_SENTINEL, Duration::from_secs(30))
|
||||
.expect("the turn reaches the custom provider without a login screen");
|
||||
harness.quit().expect("clean quit");
|
||||
}
|
||||
Reference in new issue
Block a user