Merge nucleic/dapper-velvet-urchin-ewz7 into dev
This commit is contained in:
@@ -436,8 +436,8 @@ public actor CodexAppServerBackend: AgentBackend {
|
||||
"input": Self.userInput(for: run.prompt),
|
||||
]
|
||||
// `effort` is a per-turn override; only forward a value codex accepts as a
|
||||
// `ReasoningEffort` so an unrecognized string can't fail the turn. `ultra` is the
|
||||
// wire value for the GPT-5.6 Sol option Nucleic labels “Pro”.
|
||||
// `ReasoningEffort` so an unrecognized string can't fail the turn. GPT-5.6 accepts
|
||||
// `max`; `ultra` is the Sol-only option Nucleic labels “Pro”.
|
||||
if let effort = Self.acceptedReasoningEffort(
|
||||
run.effort, model: run.model,
|
||||
codexPro: CodexAuthFile.currentSubscriptionPlanType() == "pro") {
|
||||
@@ -524,6 +524,9 @@ public actor CodexAppServerBackend: AgentBackend {
|
||||
if effort == "ultra" {
|
||||
return model == "gpt-5.6-sol" && codexPro ? effort : nil
|
||||
}
|
||||
if effort == "max" {
|
||||
return model?.hasPrefix("gpt-5.6-") == true ? effort : nil
|
||||
}
|
||||
guard ["minimal", "low", "medium", "high", "xhigh"].contains(effort) else { return nil }
|
||||
return effort
|
||||
}
|
||||
|
||||
@@ -26,14 +26,14 @@ public enum EffortLadder {
|
||||
]
|
||||
|
||||
/// The effort levels `sku` actually supports for this account. ACP wrappers expose only
|
||||
/// "Auto"; ordinary Codex models top out at "xhigh"; a ChatGPT Pro account additionally
|
||||
/// gets Sol's `ultra` wire mode; Claude models support the full range including "max".
|
||||
/// "Auto"; GPT-5.6 models support "max"; a ChatGPT Pro account additionally gets Sol's
|
||||
/// `ultra` wire mode; older Codex models top out at "xhigh".
|
||||
public static func efforts(for sku: String, codexPro: Bool = false) -> [String] {
|
||||
if let backend = BackendID.forModel(sku), autoReasoningBackends.contains(backend) {
|
||||
return autoEfforts
|
||||
}
|
||||
if sku == "gpt-5.6-sol", codexPro {
|
||||
return Array(efforts.prefix(4)) + [proEffort]
|
||||
return efforts + [proEffort]
|
||||
}
|
||||
guard let cap = effortCap(for: sku), let idx = efforts.firstIndex(of: cap) else {
|
||||
return efforts
|
||||
@@ -43,7 +43,8 @@ public enum EffortLadder {
|
||||
|
||||
/// Highest effort `sku` supports, or `nil` for the full range.
|
||||
private static func effortCap(for sku: String) -> String? {
|
||||
BackendID.forModel(sku) == .codex ? "xhigh" : nil
|
||||
if sku.hasPrefix("gpt-5.6-") { return "max" }
|
||||
return BackendID.forModel(sku) == .codex ? "xhigh" : nil
|
||||
}
|
||||
|
||||
/// Clamp `effort` to what `sku` supports, so switching to a model with a lower cap can't
|
||||
|
||||
@@ -36,7 +36,13 @@ import Testing
|
||||
#expect(CodexAppServerBackend.approvalsReviewer(autoApprove: false) == "user")
|
||||
}
|
||||
|
||||
@Test func acceptsSolProWireEffortAndRejectsUnknownValues() {
|
||||
@Test func acceptsSupportedMaxAndSolProWireEfforts() {
|
||||
#expect(CodexAppServerBackend.acceptedReasoningEffort(
|
||||
"max", model: "gpt-5.6-sol", codexPro: false) == "max")
|
||||
#expect(CodexAppServerBackend.acceptedReasoningEffort(
|
||||
"max", model: "gpt-5.6-terra", codexPro: false) == "max")
|
||||
#expect(CodexAppServerBackend.acceptedReasoningEffort(
|
||||
"max", model: "gpt-5.5", codexPro: true) == nil)
|
||||
#expect(CodexAppServerBackend.acceptedReasoningEffort(
|
||||
"ultra", model: "gpt-5.6-sol", codexPro: true) == "ultra")
|
||||
#expect(CodexAppServerBackend.acceptedReasoningEffort(
|
||||
|
||||
@@ -168,6 +168,16 @@ import Testing
|
||||
|
||||
// MARK: Constraints
|
||||
|
||||
@Test func gpt56ExposesMaxIndependentOfProPlan() {
|
||||
for sku in ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"] {
|
||||
#expect(EffortLadder.efforts(for: sku, codexPro: false).last == "max")
|
||||
}
|
||||
#expect(!EffortLadder.efforts(for: "gpt-5.5", codexPro: true).contains("max"))
|
||||
#expect(
|
||||
EffortLadder.efforts(for: "gpt-5.6-sol", codexPro: true)
|
||||
== ["low", "medium", "high", "xhigh", "max", "ultra"])
|
||||
}
|
||||
|
||||
@Test func pinRestrictsToThePinnedProvider() {
|
||||
for purpose in allPurposes {
|
||||
for level in allLevels {
|
||||
|
||||
Reference in New Issue
Block a user